v2: allow for non debug builds as well
Signed-off-by: Karol Herbst <[email protected]>
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
index 1df9a3bb98..298ec99a19 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
@@ -354,9 +354,16 @@ nvc0_screen_get_shader_param(struct pipe_screen *pscreen,
return 0;
}
+ long pref_ir;
+ char *use_nir = getenv("NV50_PROG_USE_NIR");
+ if (use_nir && strtol(use_nir, NULL, 0) == 1)
+ pref_ir = PIPE_SHADER_IR_NIR;
+ else
+ pref_ir = PIPE_SHADER_IR_TGSI;
+
switch (param) {
case PIPE_SHADER_CAP_PREFERRED_IR:
- return PIPE_SHADER_IR_TGSI;
+ return pref_ir;
case PIPE_SHADER_CAP_SUPPORTED_IRS:
return 1 << PIPE_SHADER_IR_TGSI |
1 << PIPE_SHADER_IR_NIR;
--
2.14.3
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev