Module: Mesa
Branch: master
Commit: a746be259da868722889faac7964ef6a6034953a
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=a746be259da868722889faac7964ef6a6034953a

Author: Kenneth Graunke <[email protected]>
Date:   Fri Nov 21 00:55:11 2014 -0800

i965: Make Gen4-5 push constants call _mesa_load_state_parameters too.

In commit 5e37a2a4a8a, I made the pull constant code stop calling
_mesa_load_state_parameters() when there were no pull parameters.

This worked fine on Gen6+ because the push constant code also called
it if there were any push constants.  However, the Gen4-5 push constant
code wasn't doing this.  This patch makes it do so, like the Gen6+ code.

A better long term solution would be to make core Mesa just handle this
for us when necessary.

Fixes around 8766 Piglit tests on Ironlake, and probably Gen4 as well.

Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Tested-by: Mark Janes <[email protected]>

---

 src/mesa/drivers/dri/i965/brw_curbe.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c 
b/src/mesa/drivers/dri/i965/brw_curbe.c
index 1a828ed..fea5d332 100644
--- a/src/mesa/drivers/dri/i965/brw_curbe.c
+++ b/src/mesa/drivers/dri/i965/brw_curbe.c
@@ -211,6 +211,8 @@ brw_upload_constant_buffer(struct brw_context *brw)
 
    /* fragment shader constants */
    if (brw->curbe.wm_size) {
+      _mesa_load_state_parameters(ctx, brw->fragment_program->Base.Parameters);
+
       /* BRW_NEW_CURBE_OFFSETS */
       GLuint offset = brw->curbe.wm_start * 16;
 
@@ -251,6 +253,8 @@ brw_upload_constant_buffer(struct brw_context *brw)
 
    /* vertex shader constants */
    if (brw->curbe.vs_size) {
+      _mesa_load_state_parameters(ctx, brw->vertex_program->Base.Parameters);
+
       GLuint offset = brw->curbe.vs_start * 16;
 
       /* CACHE_NEW_VS_PROG | _NEW_PROGRAM_CONSTANTS: copy uniform values */

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to