st/mesa: set MaxUnrollIterations = 255
authorBrian Paul <brianp@vmware.com>
Tue, 20 Mar 2012 23:43:52 +0000 (17:43 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 21 Mar 2012 19:46:44 +0000 (13:46 -0600)
The default was 32 for the EmitNoLoops=0 case.  This allows the oZone3D
soft shadows test to work properly with the vmware driver.  Jose reported
that SM3 supports up to 255 loop iterations.

NOTE: This is a candidate for the 8.0 branch.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_extensions.c

index 33bc6ed729b9acc377eb4e53b36c8f31ec4aa906..afea0ea4f5f7873997066d5c2e31dcbd055590ab 100644 (file)
@@ -216,6 +216,8 @@ void st_init_limits(struct st_context *st)
 
       if (options->EmitNoLoops)
          options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
+      else
+         options->MaxUnrollIterations = 255; /* SM3 limit */
    }
 
    /* PIPE_SHADER_CAP_MAX_INPUTS for the FS specifies the maximum number