mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 03:50:13 +01:00
glsl: Initialize ctx->ShaderCompilerOptions in standalone scaffolding.
This code is copied from _mesa_init_shader_state(). Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
1c95cea40b
commit
6bb9acfb4e
1 changed files with 12 additions and 0 deletions
|
|
@ -123,4 +123,16 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
|
|||
ctx->Const.FragmentProgram.MaxUniformComponents = 64;
|
||||
|
||||
ctx->Const.MaxDrawBuffers = 1;
|
||||
|
||||
/* Set up default shader compiler options. */
|
||||
struct gl_shader_compiler_options options;
|
||||
memset(&options, 0, sizeof(options));
|
||||
options.MaxUnrollIterations = 32;
|
||||
options.MaxIfDepth = UINT_MAX;
|
||||
|
||||
/* Default pragma settings */
|
||||
options.DefaultPragmas.Optimize = true;
|
||||
|
||||
for (int sh = 0; sh < MESA_SHADER_TYPES; ++sh)
|
||||
memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue