mesa/st: ask GLSL to not emit noise since we have a dummy implementation
authorLuca Barbieri <luca@luca-barbieri.com>
Tue, 14 Sep 2010 03:10:59 +0000 (05:10 +0200)
committerLuca Barbieri <luca@luca-barbieri.com>
Tue, 14 Sep 2010 04:08:03 +0000 (06:08 +0200)
Note, BTW, that the Gallium implementation returns 0.5, which seems
to violate the GLSL spec, where it should return 0.0 instead.

Not sure whether changing it to 0 is correct or not.

src/mesa/state_tracker/st_extensions.c

index 3f91eb78d81b605507e9e4d68012991bf1945fd2..4c223f33742bc0f1d4dcb461fcaedb3186ea6fd3 100644 (file)
@@ -162,6 +162,8 @@ void st_init_limits(struct st_context *st)
       pc->MaxNativeAddressRegs     = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_ADDRS);
       pc->MaxNativeParameters      = screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONSTS);
 
+      options->EmitNoNoise = TRUE;
+
       /* TODO: make these more fine-grained if anyone needs it */
       options->EmitNoIfs = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);
       options->EmitNoFunctions = !screen->get_shader_param(screen, i, PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH);