summaryrefslogtreecommitdiff
path: root/dist/Mesa/src/glsl/standalone_scaffolding.cpp
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-09-05 13:18:26 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-09-05 13:18:26 +0000
commitf12cf3a3954cbc4efe4f8d93e4e6c5becadf9728 (patch)
tree6bceb8dc39b503385d762f2f74ac755accdb22a8 /dist/Mesa/src/glsl/standalone_scaffolding.cpp
parent57deb4ec7315ce5fb9f3c0370fdd49a84dc36ef0 (diff)
Import Mesa 9.2.0
Diffstat (limited to 'dist/Mesa/src/glsl/standalone_scaffolding.cpp')
-rw-r--r--dist/Mesa/src/glsl/standalone_scaffolding.cpp57
1 files changed, 14 insertions, 43 deletions
diff --git a/dist/Mesa/src/glsl/standalone_scaffolding.cpp b/dist/Mesa/src/glsl/standalone_scaffolding.cpp
index 6c25010b7..11cd6cdc0 100644
--- a/dist/Mesa/src/glsl/standalone_scaffolding.cpp
+++ b/dist/Mesa/src/glsl/standalone_scaffolding.cpp
@@ -76,7 +76,6 @@ _mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
shader = rzalloc(NULL, struct gl_shader);
if (shader) {
shader->Type = type;
- shader->Stage = _mesa_shader_enum_to_shader_stage(type);
shader->Name = name;
shader->RefCount = 1;
}
@@ -91,36 +90,21 @@ 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_compute_shader = true;
- 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_ES3_compatibility = false;
+ ctx->Extensions.ARB_draw_instanced = true;
ctx->Extensions.ARB_fragment_coord_conventions = true;
- ctx->Extensions.ARB_gpu_shader5 = true;
- ctx->Extensions.ARB_sample_shading = 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_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.ARB_viewport_array = 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->Extensions.ARB_gpu_shader5 = true;
ctx->Const.GLSLVersion = 120;
@@ -129,29 +113,16 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Const.MaxClipPlanes = 6;
ctx->Const.MaxTextureUnits = 2;
ctx->Const.MaxTextureCoordUnits = 2;
- ctx->Const.Program[MESA_SHADER_VERTEX].MaxAttribs = 16;
+ ctx->Const.VertexProgram.MaxAttribs = 16;
- ctx->Const.Program[MESA_SHADER_VERTEX].MaxUniformComponents = 512;
- ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents = 32;
+ ctx->Const.VertexProgram.MaxUniformComponents = 512;
ctx->Const.MaxVarying = 8; /* == gl_MaxVaryingFloats / 4 */
- ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits = 0;
+ ctx->Const.VertexProgram.MaxTextureImageUnits = 0;
ctx->Const.MaxCombinedTextureImageUnits = 2;
- ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxTextureImageUnits = 2;
- ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxUniformComponents = 64;
- ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 32;
+ ctx->Const.FragmentProgram.MaxTextureImageUnits = 2;
+ ctx->Const.FragmentProgram.MaxUniformComponents = 64;
ctx->Const.MaxDrawBuffers = 1;
- ctx->Const.MaxComputeWorkGroupCount[0] = 65535;
- ctx->Const.MaxComputeWorkGroupCount[1] = 65535;
- ctx->Const.MaxComputeWorkGroupCount[2] = 65535;
- ctx->Const.MaxComputeWorkGroupSize[0] = 1024;
- ctx->Const.MaxComputeWorkGroupSize[1] = 1024;
- ctx->Const.MaxComputeWorkGroupSize[2] = 64;
- ctx->Const.MaxComputeWorkGroupInvocations = 1024;
- ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits = 16;
- ctx->Const.Program[MESA_SHADER_COMPUTE].MaxUniformComponents = 1024;
- ctx->Const.Program[MESA_SHADER_COMPUTE].MaxInputComponents = 0; /* not used */
- ctx->Const.Program[MESA_SHADER_COMPUTE].MaxOutputComponents = 0; /* not used */
/* Set up default shader compiler options. */
struct gl_shader_compiler_options options;
@@ -162,6 +133,6 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
/* Default pragma settings */
options.DefaultPragmas.Optimize = true;
- for (int sh = 0; sh < MESA_SHADER_STAGES; ++sh)
+ for (int sh = 0; sh < MESA_SHADER_TYPES; ++sh)
memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
}