[Mesa-dev] [PATCH 1/4] gallium: Adds PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS

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


---
 src/gallium/include/pipe/p_defines.h   |   11 ++++++++++-
 src/mesa/state_tracker/st_extensions.c |    3 +++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 4155178..059f448 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -510,6 +510,14 @@ enum pipe_capf
    PIPE_CAPF_GUARD_BAND_BOTTOM = 24
 };
 
+/**
+ *  Return values for varyings_packing_constraints cap
+ */
+#define PIPE_PACKING_CONSTRAINT_NONE  0
+#define PIPE_PACKING_CONSTRAINT_SMOOTH_NO_PERSPECTIVE_MIXED 1
+#define PIPE_PACKING_CONSTRAINT_NO_MIXED_INTERPOLATION 2
+#define PIPE_PACKING_CONSTRAINT_AVOID_PACKING 3
+
 /* Shader caps not specific to any single stage */
 enum pipe_shader_cap
 {
@@ -533,7 +541,8 @@ enum pipe_shader_cap
    PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */
    PIPE_SHADER_CAP_INTEGERS = 17,
    PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 18,
-   PIPE_SHADER_CAP_OUTPUT_READ = 19
+   PIPE_SHADER_CAP_OUTPUT_READ = 19,
+   PIPE_SHADER_CAP_VARYINGS_PACKING_CONSTRAINTS = 20
 };
 
 
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index fb36a68..3092a1a 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -206,6 +206,9 @@ 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);
+
       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