i965: Only call _mesa_load_state_parameters if prog exists.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 18 Dec 2015 10:57:05 +0000 (02:57 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 23 Dec 2015 01:22:04 +0000 (17:22 -0800)
With the automatic-TCS creation, we won't have a prog, but still need to
upload push constants.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/i965/gen6_vs_state.c

index 6653a6d759b431d4c8dfb1d81b808e006932bf52..da3b4cd90e82703b52b90e9ce45c4484b8f71f6c 100644 (file)
@@ -65,7 +65,8 @@ gen6_upload_push_constants(struct brw_context *brw,
        * basic type of PROGRAM_STATE_VAR.
        */
       /* XXX: Should this happen somewhere before to get our state flag set? */
-      _mesa_load_state_parameters(ctx, prog->Parameters);
+      if (prog)
+         _mesa_load_state_parameters(ctx, prog->Parameters);
 
       gl_constant_value *param;
       unsigned i;