- why yes, that is a brown paper bag

- fix glxgears on 965
This commit is contained in:
Dave Airlie 2008-04-18 05:20:40 +00:00
parent 130b9c7bdd
commit a80004cee1
2 changed files with 59 additions and 17 deletions

View File

@ -1,3 +1,21 @@
commit fda4895d26eec6d810da51a6c023a5459230ff6a
Author: Dave Airlie <airlied@panoply-rh.(none)>
Date: Fri Apr 18 15:14:48 2008 +1000
i965: fix vb aperture space check
commit e92e3848e7c8c1481e785973d8609072f2f5db21
Author: Dave Airlie <airlied@panoply-rh.(none)>
Date: Fri Apr 18 15:09:11 2008 +1000
965: fix vb upload size check
commit e149e1b953bccdf735665547798574e06f989730
Author: Dave Airlie <airlied@panoply-rh.(none)>
Date: Fri Apr 18 15:05:35 2008 +1000
i965: fix gs_prog aperture check
commit f2a6404ef39b4985788aaf9ec8b540704e5aa92b commit f2a6404ef39b4985788aaf9ec8b540704e5aa92b
Author: Dave Airlie <airlied@redhat.com> Author: Dave Airlie <airlied@redhat.com>
Date: Fri Apr 18 12:12:53 2008 +1000 Date: Fri Apr 18 12:12:53 2008 +1000
@ -1033,7 +1051,7 @@ index 0f7b738..b354740 100644
GLuint max_index ); GLuint max_index );
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index 839735d..9f780bc 100644 index 839735d..aa985d6 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c +++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -255,8 +255,10 @@ static void wrap_buffers( struct brw_context *brw, @@ -255,8 +255,10 @@ static void wrap_buffers( struct brw_context *brw,
@ -1062,7 +1080,7 @@ index 839735d..9f780bc 100644
GLuint i; GLuint i;
const unsigned char *ptr = NULL; const unsigned char *ptr = NULL;
GLuint interleave = 0; GLuint interleave = 0;
+ int ret; + int ret = 0;
struct brw_vertex_element *enabled[VERT_ATTRIB_MAX]; struct brw_vertex_element *enabled[VERT_ATTRIB_MAX];
GLuint nr_enabled = 0; GLuint nr_enabled = 0;
@ -1075,7 +1093,16 @@ index 839735d..9f780bc 100644
for (i = 0; i < nr_enabled; i++) { for (i = 0; i < nr_enabled; i++) {
struct brw_vertex_element *input = enabled[i]; struct brw_vertex_element *input = enabled[i];
@@ -367,7 +370,7 @@ GLboolean brw_upload_vertices( struct brw_context *brw, @@ -359,6 +362,8 @@ GLboolean brw_upload_vertices( struct brw_context *brw,
dri_bo_reference(input->bo);
input->offset = (unsigned long)input->glarray->Ptr;
input->stride = input->glarray->StrideB;
+
+ ret |= dri_bufmgr_check_aperture_space(input->bo);
} else {
/* Queue the buffer object up to be uploaded in the next pass,
* when we've decided if we're doing interleaved or not.
@@ -367,7 +372,7 @@ GLboolean brw_upload_vertices( struct brw_context *brw,
/* Position array not properly enabled: /* Position array not properly enabled:
*/ */
if (input->glarray->StrideB == 0) if (input->glarray->StrideB == 0)
@ -1084,14 +1111,18 @@ index 839735d..9f780bc 100644
interleave = input->glarray->StrideB; interleave = input->glarray->StrideB;
ptr = input->glarray->Ptr; ptr = input->glarray->Ptr;
@@ -415,6 +418,34 @@ GLboolean brw_upload_vertices( struct brw_context *brw, @@ -415,6 +420,38 @@ GLboolean brw_upload_vertices( struct brw_context *brw,
} }
} }
+ ret = dri_bufmgr_check_aperture_space(brw->vb.upload.bo); + if (brw->vb.upload.bo) {
+ ret |= dri_bufmgr_check_aperture_space(brw->vb.upload.bo);
+ }
+
+ if (ret) + if (ret)
+ return 1; + return 1;
+ +
+
+ return 0; + return 0;
+} +}
+ +
@ -1119,7 +1150,7 @@ index 839735d..9f780bc 100644
/* Now emit VB and VEP state packets. /* Now emit VB and VEP state packets.
* *
* This still defines a hardware VB for each input, even if they * This still defines a hardware VB for each input, even if they
@@ -476,12 +507,12 @@ GLboolean brw_upload_vertices( struct brw_context *brw, @@ -476,12 +513,12 @@ GLboolean brw_upload_vertices( struct brw_context *brw,
((i * 4) << BRW_VE1_DST_OFFSET_SHIFT)); ((i * 4) << BRW_VE1_DST_OFFSET_SHIFT));
} }
ADVANCE_BATCH(); ADVANCE_BATCH();
@ -1136,7 +1167,7 @@ index 839735d..9f780bc 100644
{ {
GLcontext *ctx = &brw->intel.ctx; GLcontext *ctx = &brw->intel.ctx;
struct intel_context *intel = &brw->intel; struct intel_context *intel = &brw->intel;
@@ -489,6 +520,7 @@ void brw_upload_indices( struct brw_context *brw, @@ -489,6 +526,7 @@ void brw_upload_indices( struct brw_context *brw,
dri_bo *bo; dri_bo *bo;
struct gl_buffer_object *bufferobj = index_buffer->obj; struct gl_buffer_object *bufferobj = index_buffer->obj;
GLuint offset = (GLuint)index_buffer->ptr; GLuint offset = (GLuint)index_buffer->ptr;
@ -1144,7 +1175,7 @@ index 839735d..9f780bc 100644
/* Turn into a proper VBO: /* Turn into a proper VBO:
*/ */
@@ -524,6 +556,19 @@ void brw_upload_indices( struct brw_context *brw, @@ -524,6 +562,19 @@ void brw_upload_indices( struct brw_context *brw,
} }
} }
@ -1164,7 +1195,7 @@ index 839735d..9f780bc 100644
/* Emit the indexbuffer packet: /* Emit the indexbuffer packet:
*/ */
{ {
@@ -548,3 +593,4 @@ void brw_upload_indices( struct brw_context *brw, @@ -548,3 +599,4 @@ void brw_upload_indices( struct brw_context *brw,
dri_bo_unreference(bo); dri_bo_unreference(bo);
} }
} }
@ -1195,10 +1226,10 @@ index ce0df03..2cf29cc 100644
diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c
index 922a3ba..8ad2762 100644 index 922a3ba..9419315 100644
--- a/src/mesa/drivers/dri/i965/brw_gs.c --- a/src/mesa/drivers/dri/i965/brw_gs.c
+++ b/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c
@@ -162,7 +162,7 @@ static void populate_key( struct brw_context *brw, @@ -162,10 +162,10 @@ static void populate_key( struct brw_context *brw,
/* Calculate interpolants for triangle and line rasterization. /* Calculate interpolants for triangle and line rasterization.
*/ */
@ -1206,17 +1237,24 @@ index 922a3ba..8ad2762 100644
+static int prepare_gs_prog( struct brw_context *brw ) +static int prepare_gs_prog( struct brw_context *brw )
{ {
struct brw_gs_prog_key key; struct brw_gs_prog_key key;
-
@@ -184,6 +184,8 @@ static void upload_gs_prog( struct brw_context *brw ) + int ret = 0;
/* Populate the key:
*/
populate_key(brw, &key);
@@ -183,7 +183,11 @@ static void upload_gs_prog( struct brw_context *brw )
&brw->gs.prog_data);
if (brw->gs.prog_bo == NULL) if (brw->gs.prog_bo == NULL)
compile_gs_prog( brw, &key ); compile_gs_prog( brw, &key );
+
+ ret |= dri_bufmgr_check_aperture_space(brw->gs.prog_bo);
} }
+ +
+ return dri_bufmgr_check_aperture_space(brw->gs.prog_bo); + return ret;
} }
@@ -193,5 +195,5 @@ const struct brw_tracked_state brw_gs_prog = { @@ -193,5 +197,5 @@ const struct brw_tracked_state brw_gs_prog = {
.brw = BRW_NEW_PRIMITIVE, .brw = BRW_NEW_PRIMITIVE,
.cache = CACHE_NEW_VS_PROG .cache = CACHE_NEW_VS_PROG
}, },

View File

@ -15,7 +15,7 @@
Summary: Mesa graphics libraries Summary: Mesa graphics libraries
Name: mesa Name: mesa
Version: 7.1 Version: 7.1
Release: 0.26%{?dist} Release: 0.27%{?dist}
License: MIT License: MIT
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://www.mesa3d.org URL: http://www.mesa3d.org
@ -29,7 +29,7 @@ Source3: make-git-snapshot.sh
Patch0: mesa-7.1pre-osmesa-version.patch Patch0: mesa-7.1pre-osmesa-version.patch
Patch2: mesa-7.1pre-nukeglthread-debug.patch Patch2: mesa-7.1pre-nukeglthread-debug.patch
Patch3: mesa-7.1-f2a6404ef-update.patch Patch3: mesa-7.1-fda4895d-update.patch
# This doesn't work, disable for now. # This doesn't work, disable for now.
Patch4: disable-tex-offset.patch Patch4: disable-tex-offset.patch
@ -413,6 +413,10 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/mesa-demos-data %{_libdir}/mesa-demos-data
%changelog %changelog
* Fri Apr 18 2008 Dave Airlie <airlied@redhat.com> 7.1-0.27
- why yes, that is a brown paper bag
- fix glxgears on 965
* Fri Apr 18 2008 Dave Airlie <airlied@redhat.com> 7.1-0.26 * Fri Apr 18 2008 Dave Airlie <airlied@redhat.com> 7.1-0.26
- fix compiz alt-tab crashing on out of the box intel driver - fix compiz alt-tab crashing on out of the box intel driver
- some other upstream bugfixes as well - some other upstream bugfixes as well