mesa/st: ask GLSL to not emit noise since we have a dummy implementation

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.
This commit is contained in:
Luca Barbieri 2010-09-14 05:10:59 +02:00
parent b37459388b
commit fbc7c9b7a9
1 changed files with 2 additions and 0 deletions

View 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);