Merge branch 'f19' into f18

This commit is contained in:
Adam Jackson 2013-03-19 11:51:30 -04:00
commit 1c91a873d8
3 changed files with 2056 additions and 9 deletions

View File

@ -0,0 +1,63 @@
diff -up Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.c.marcheu Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.c
--- Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.c.marcheu 2013-02-20 10:26:22.000000000 +1000
+++ Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.c 2013-03-19 10:44:12.761921622 +1000
@@ -329,6 +329,7 @@ brwCreateContext(int api,
brw->urb.max_gs_entries = 256;
}
brw->urb.gen6_gs_previously_active = false;
+ brw->urb.prims_since_last_flush = 0;
} else if (intel->gen == 5) {
brw->urb.size = 1024;
brw->max_vs_threads = 72;
diff -up Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.h.marcheu Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.h
--- Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.h.marcheu 2013-02-23 11:45:52.000000000 +1000
+++ Mesa-9.1/src/mesa/drivers/dri/i965/brw_context.h 2013-03-19 10:44:12.762921630 +1000
@@ -864,6 +864,7 @@ struct brw_context
* URB space for the GS.
*/
bool gen6_gs_previously_active;
+ int prims_since_last_flush;
} urb;
diff -up Mesa-9.1/src/mesa/drivers/dri/i965/brw_draw.c.marcheu Mesa-9.1/src/mesa/drivers/dri/i965/brw_draw.c
--- Mesa-9.1/src/mesa/drivers/dri/i965/brw_draw.c.marcheu 2013-02-20 10:26:22.000000000 +1000
+++ Mesa-9.1/src/mesa/drivers/dri/i965/brw_draw.c 2013-03-19 10:44:12.763921639 +1000
@@ -294,10 +294,14 @@ static void brw_merge_inputs( struct brw
* Resolve the depth buffer's HiZ buffer and resolve the depth buffer of each
* enabled depth texture.
*
+ * We don't resolve the depth buffer's HiZ if no primitives have been drawn
+ * since the last flush. This avoids a case where we lockup the GPU on boot
+ * when this is the first thing we do.
+ *
* (In the future, this will also perform MSAA resolves).
*/
static void
-brw_predraw_resolve_buffers(struct brw_context *brw)
+brw_predraw_resolve_buffers(struct brw_context *brw, int nr_prims)
{
struct gl_context *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel;
@@ -306,9 +310,11 @@ brw_predraw_resolve_buffers(struct brw_c
/* Resolve the depth buffer's HiZ buffer. */
depth_irb = intel_get_renderbuffer(ctx->DrawBuffer, BUFFER_DEPTH);
- if (depth_irb)
+ if (depth_irb && brw->urb.prims_since_last_flush > 0 )
intel_renderbuffer_resolve_hiz(intel, depth_irb);
+ brw->urb.prims_since_last_flush = nr_prims;
+
/* Resolve depth buffer of each enabled depth texture. */
for (int i = 0; i < BRW_MAX_TEX_UNIT; i++) {
if (!ctx->Texture.Unit[i]._ReallyEnabled)
@@ -445,7 +451,7 @@ static bool brw_try_draw_prims( struct g
* and finalizing textures but before setting up any hardware state for
* this draw call.
*/
- brw_predraw_resolve_buffers(brw);
+ brw_predraw_resolve_buffers(brw, nr_prims);
/* Bind all inputs, derive varying and size information:
*/

1974
mesa-9.1-53-gd0ccb5b.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -48,7 +48,7 @@
Summary: Mesa graphics libraries
Name: mesa
Version: 9.1
Release: 1%{?dist}
Release: 3%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@ -63,14 +63,17 @@ Source3: make-git-snapshot.sh
# Fedora opts to ignore the optional part of clause 2 and treat that code as 2 clause BSD.
Source4: Mesa-MLAA-License-Clarification-Email.txt
# -fno-rtti makes nv50 assert angry
Patch0: nv50-fix-build.patch
Patch1: intel-revert-gl3.patch
# git diff-tree -p mesa-9.1..origin/9.1 > `git describe origin/9.1`.patch
Patch0: mesa-9.1-53-gd0ccb5b.patch
Patch1: nv50-fix-build.patch
Patch2: intel-revert-gl3.patch
#Patch7: mesa-7.1-link-shared.patch
Patch9: mesa-8.0-llvmpipe-shmget.patch
#Patch11: mesa-8.0-nouveau-tfp-blacklist.patch
Patch12: mesa-8.0.1-fix-16bpp.patch
#Patch13: mesa-9.0.1-less-cxx-please.patch
Patch14: i965-hack-hiz-snb-fix.patch
BuildRequires: pkgconfig autoconf automake libtool
%if %{with_hardware}
@ -280,8 +283,9 @@ Mesa shared glapi
%prep
%setup -q -n Mesa-%{version}%{?snapshot}
#setup -q -n mesa-%{gitdate}
%patch0 -p1 -b .nv50rtti
%patch1 -p1 -b .nogl3
%patch0 -p1 -b .git
%patch1 -p1 -b .nv50rtti
%patch2 -p1 -b .nogl3
#%patch11 -p1 -b .nouveau
# this fastpath is:
@ -295,8 +299,8 @@ Mesa shared glapi
#patch9 -p1 -b .shmget
#patch12 -p1 -b .16bpp
#%patch13 -p1 -b .less-cpp
# hack from chromium - awaiting real upstream fix
%patch14 -p1 -b .snbfix
# default to dri (not xlib) for libGL on all arches
# XXX please fix upstream
sed -i 's/^default_driver.*$/default_driver="dri"/' configure.ac
@ -590,6 +594,12 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Tue Mar 19 2013 Adam Jackson <ajax@redhat.com> 9.1-3
- mesa-9.1-53-gd0ccb5b.patch: Sync with today's git
* Tue Mar 19 2013 Dave Airlie <airlied@redhat.com> 9.1-2
- add SNB hang workaround from chromium
* Fri Mar 08 2013 Adam Jackson <ajax@redhat.com> 9.1-1
- Mesa 9.1