Mesa (master): gallivm: add PIPE_SHADER_CAP_PREFERRED_IR switch case, remove default
Brian Paul
brianp at kemper.freedesktop.org
Wed May 7 18:16:33 UTC 2014
Module: Mesa
Branch: master
Commit: baec25635df21884755d05451d8b577841a77cfc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=baec25635df21884755d05451d8b577841a77cfc
Author: Brian Paul <brianp at vmware.com>
Date: Mon May 5 10:17:48 2014 -0600
gallivm: add PIPE_SHADER_CAP_PREFERRED_IR switch case, remove default
Return PIPE_SHADER_IR_TGSI for the PIPE_SHADER_CAP_PREFERRED_IR query.
Remove default switch case so we learn of missing switch cases at
compile time.
Reviewed-by: José Fonseca <jfonseca at vmware.com>
---
src/gallium/auxiliary/gallivm/lp_bld_limits.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_limits.h b/src/gallium/auxiliary/gallivm/lp_bld_limits.h
index 87be351..6cb0949 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_limits.h
+++ b/src/gallium/auxiliary/gallivm/lp_bld_limits.h
@@ -122,11 +122,15 @@ gallivm_get_shader_param(enum pipe_shader_cap param)
return PIPE_MAX_SAMPLERS;
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return PIPE_MAX_SHADER_SAMPLER_VIEWS;
+ case PIPE_SHADER_CAP_PREFERRED_IR:
+ return PIPE_SHADER_IR_TGSI;
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
return 1;
- default:
- return 0;
}
+ /* if we get here, we missed a shader cap above (and should have seen
+ * a compiler warning.)
+ */
+ return 0;
}
More information about the mesa-commit
mailing list