[Mesa-dev] [PATCH] st/mesa: Convert PIPE_SHADER_CAP_CONSTRAINT_* to mesa's PACKING_CONSTRAINT_*

Vincent Lejeune vljn at ovi.com
Fri Feb 24 11:43:39 PST 2012


v2: remove underscore between NO and PERSPECTIVE in PIPE_PACKING_CONSTRAINT_SMOOTH_NO_PERSPECTIVE_MIXED
---
 src/mesa/state_tracker/st_extensions.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index fb36a68..04ff9d4 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -206,6 +206,22 @@ void st_init_limits(struct st_context *st)
       options->EmitNoIndirectUniform = !screen->get_shader_param(screen, sh,
                                         PIPE_SHADER_CAP_INDIRECT_CONST_ADDR);
 
+      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_NOPERSPECTIVE_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