X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fglsl%2Fstandalone_scaffolding.cpp;h=cbff6d182286af70e3e0d3bed656d588bd14d970;hb=d257350949440539cb4c3c20349da7f1d5afb693;hp=b5ef768bd775e912890e6389c12426aca8540819;hpb=c72cf538173329f639c2b64ef091dbd4a71e0bf6;p=mesa.git diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp index b5ef768bd77..cbff6d18228 100644 --- a/src/glsl/standalone_scaffolding.cpp +++ b/src/glsl/standalone_scaffolding.cpp @@ -90,19 +90,34 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) ctx->Extensions.dummy_false = false; ctx->Extensions.dummy_true = true; - ctx->Extensions.ARB_ES2_compatibility = true; - ctx->Extensions.ARB_ES3_compatibility = false; + ctx->Extensions.ARB_conservative_depth = true; ctx->Extensions.ARB_draw_instanced = true; + ctx->Extensions.ARB_ES2_compatibility = true; + ctx->Extensions.ARB_ES3_compatibility = true; + ctx->Extensions.ARB_explicit_attrib_location = true; ctx->Extensions.ARB_fragment_coord_conventions = true; - ctx->Extensions.EXT_texture_array = true; - ctx->Extensions.NV_texture_rectangle = true; - ctx->Extensions.EXT_texture3D = true; - ctx->Extensions.OES_EGL_image_external = true; + ctx->Extensions.ARB_gpu_shader5 = true; + ctx->Extensions.ARB_sample_shading = true; ctx->Extensions.ARB_shader_bit_encoding = true; + ctx->Extensions.ARB_shader_stencil_export = true; + ctx->Extensions.ARB_shader_texture_lod = true; + ctx->Extensions.ARB_shading_language_420pack = true; ctx->Extensions.ARB_shading_language_packing = true; - ctx->Extensions.OES_standard_derivatives = true; ctx->Extensions.ARB_texture_cube_map_array = true; + ctx->Extensions.ARB_texture_gather = true; ctx->Extensions.ARB_texture_multisample = true; + ctx->Extensions.ARB_texture_query_levels = true; + ctx->Extensions.ARB_texture_query_lod = true; + ctx->Extensions.ARB_uniform_buffer_object = true; + + ctx->Extensions.OES_EGL_image_external = true; + ctx->Extensions.OES_standard_derivatives = true; + + ctx->Extensions.EXT_shader_integer_mix = true; + ctx->Extensions.EXT_texture3D = true; + ctx->Extensions.EXT_texture_array = true; + + ctx->Extensions.NV_texture_rectangle = true; ctx->Const.GLSLVersion = 120; @@ -114,11 +129,25 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api) ctx->Const.VertexProgram.MaxAttribs = 16; ctx->Const.VertexProgram.MaxUniformComponents = 512; + ctx->Const.VertexProgram.MaxOutputComponents = 32; ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */ - ctx->Const.MaxVertexTextureImageUnits = 0; + ctx->Const.VertexProgram.MaxTextureImageUnits = 0; ctx->Const.MaxCombinedTextureImageUnits = 2; - ctx->Const.MaxTextureImageUnits = 2; + ctx->Const.FragmentProgram.MaxTextureImageUnits = 2; ctx->Const.FragmentProgram.MaxUniformComponents = 64; + ctx->Const.FragmentProgram.MaxInputComponents = 32; 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)); }