[Mesa-dev] [PATCH 2/4] st/mesa: Convert PIPE_SHADER_CAP_CONSTRAINT_* to mesa's PACKING_CONSTRAINT_*
Vincent Lejeune
vljn at ovi.com
Fri Feb 24 11:11:28 PST 2012
---
src/mesa/state_tracker/st_extensions.c | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 3092a1a..621d910 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -206,8 +206,21 @@ void st_init_limits(struct st_context *st)
options->EmitNoIndirectUniform = !screen->get_shader_param(screen, sh,
PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
- options->VaryingsPackingConstraint = screen->get_shader_param(screen, sh,
- PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS);
+ switch (screen->get_shader_param(screen, sh,
+ PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS)) {
+ case PIPE_PACKING_CONSTRAINT_NONE:
+ options->VaryingsPackingConstraint = PACKING_CONSTRAINT_NONE;
+ break;
+ case PIPE_PACKING_CONSTRAINT_SMOOTH_NO_PERSPECTIVE_MIXED:
+ options->VaryingsPackingConstraint = PACKING_CONSTRAINT_SMOOTH_NOPERSPECTIVE_MIXED;
+ break;
+ case PIPE_PACKING_CONSTRAINT_NO_MIXED_INTERPOLATION:
+ options->VaryingsPackingConstraint = PACKING_CONSTRAINT_NO_MIXED_INTERPOLATION;
+ break;
+ default:
+ options->VaryingsPackingConstraint = PACKING_CONSTRAINT_AVOID_PACKING;
+ break;
+ }
if (options->EmitNoLoops)
options->MaxUnrollIterations = MIN2(screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_INSTRUCTIONS), 65536);
--
1.7.7
More information about the mesa-dev
mailing list