summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2016-05-21 14:21:32 -0700
committerJordan Justen <[email protected]>2016-06-01 19:29:02 -0700
commit7b9def35835232a10010f256b9c108219f97f752 (patch)
tree1bbad9392a897a4e09c10cb38e835f0a7ba98ff4 /src/mesa
parent1205999c229b8e67af39fb9875bd87bc0a1404eb (diff)
glsl: Add glsl LowerCsDerivedVariables option
v2: * Move lower flag to context constants. (Ken) Cc: "12.0" <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> (v1) Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c1
-rw-r--r--src/mesa/main/mtypes.h3
-rw-r--r--src/mesa/state_tracker/st_extensions.c1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 97dc22621c9..ad8d5140a3f 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -599,6 +599,7 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.MaxClipPlanes = 8;
ctx->Const.LowerTessLevel = true;
+ ctx->Const.LowerCsDerivedVariables = true;
ctx->Const.PrimitiveRestartForPatches = true;
ctx->Const.Program[MESA_SHADER_VERTEX].MaxNativeInstructions = 16 * 1024;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 22335261fb4..d0f37605f6f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -3763,6 +3763,9 @@ struct gl_constants
GLuint MaxTessControlTotalOutputComponents;
bool LowerTessLevel; /**< Lower gl_TessLevel* from float[n] to vecn? */
bool PrimitiveRestartForPatches;
+ bool LowerCsDerivedVariables; /**< Lower gl_GlobalInvocationID and
+ * gl_LocalInvocationIndex based on
+ * other builtin variables. */
};
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index d35e19f3f90..383983b26b9 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -314,6 +314,7 @@ void st_init_limits(struct pipe_screen *screen,
}
c->LowerTessLevel = true;
+ c->LowerCsDerivedVariables = true;
c->PrimitiveRestartForPatches =
screen->get_param(screen, PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES);