summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_context.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2015-03-06 01:17:22 -0800
committerKenneth Graunke <kenneth@whitecape.org>2015-03-08 20:03:57 -0700
commitb200cbb0a41aaebb007668f870a483f0b9ecd898 (patch)
tree7270b41cca62b1cf0827fa66b17ce5346e6f10f3 /src/mesa/drivers/dri/i965/brw_context.c
parenta55da73be46b4576015417b2dff71a719bc8b797 (diff)
downloadexternal_mesa3d-b200cbb0a41aaebb007668f870a483f0b9ecd898.zip
external_mesa3d-b200cbb0a41aaebb007668f870a483f0b9ecd898.tar.gz
external_mesa3d-b200cbb0a41aaebb007668f870a483f0b9ecd898.tar.bz2
nir: Add native_integers to nir_shader_compiler_options.
glsl_to_nir, tgsi_to_nir, and prog_to_nir all want to know whether the driver supports native integers. Presumably other passes may as well. Adding this to nir_shader_compiler_options is an easy way to provide that information, as it's accessible via nir_shader::options. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 8141b45..0881e48 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -551,7 +551,9 @@ brw_initialize_context_constants(struct brw_context *brw)
ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents = 128;
}
- static const nir_shader_compiler_options nir_options = {};
+ static const nir_shader_compiler_options nir_options = {
+ .native_integers = true,
+ };
/* We want the GLSL compiler to emit code that uses condition codes */
for (int i = 0; i < MESA_SHADER_STAGES; i++) {