summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2014-06-08 00:05:37 -0700
committerJordan Justen <[email protected]>2014-06-16 09:54:52 -0700
commit10e03b4401b025f84b97f7e578a716a63c687196 (patch)
tree5bf94bb0b5647cd11cd69b9cfabcb63deaa514b9
parentf5ca8c19727c76256785e1a9f44da058fdcfe891 (diff)
i965/cs: Use override structure rather than separate env var
In 25268b93, we added a new environment variable (INTEL_COMPUTE_SHADER) to allow some constant values to be upgraded for the ARB_compute_shader extension. Now, we can look to see if the extension was enabled via the MESA_EXTENSION_OVERRIDE environment variable. Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c3
-rw-r--r--src/mesa/drivers/dri/i965/intel_extensions.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 39dd5825f9a..cfb0be0648e 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -34,6 +34,7 @@
#include "main/api_exec.h"
#include "main/context.h"
#include "main/fbobject.h"
+#include "main/extensions.h"
#include "main/imports.h"
#include "main/macros.h"
#include "main/points.h"
@@ -302,7 +303,7 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = max_samplers;
else
ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits = 0;
- if (getenv("INTEL_COMPUTE_SHADER")) {
+ if (_mesa_extension_override_enables.ARB_compute_shader) {
ctx->Const.Program[MESA_SHADER_COMPUTE].MaxTextureImageUnits = BRW_MAX_TEX_UNIT;
ctx->Const.MaxUniformBufferBindings += 12;
} else {
diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
index 9babe64884d..d1df1977786 100644
--- a/src/mesa/drivers/dri/i965/intel_extensions.c
+++ b/src/mesa/drivers/dri/i965/intel_extensions.c
@@ -300,9 +300,6 @@ intelInitExtensions(struct gl_context *ctx)
*/
if (ctx->API == API_OPENGL_CORE)
ctx->Extensions.ARB_viewport_array = true;
-
- if (getenv("INTEL_COMPUTE_SHADER"))
- ctx->Extensions.ARB_compute_shader = true;
}
if (brw->gen >= 8) {