[Mesa-dev] [PATCH v2 3/3] main/get: support ARB_gpu_shader5
Jordan Justen
jordan.l.justen at intel.com
Sun Jan 26 10:48:55 PST 2014
If a driver enables ARB_gpu_shader5 and sets Const.MaxVertexSteams >= 4,
then piglit's arb_gpu_shader5-minmax test should now pass.
v2:
* MIN_FRAGMENT_INTERPOLATION_OFFSET & MAX_FRAGMENT_INTERPOLATION_OFFSET
now are NORM_CONST and no longer require fields to be added to
struct gl_constants
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Matt Turner <mattst88 at gmail.com> (v1)
---
src/mesa/main/config.h | 9 +++++++++
src/mesa/main/get.c | 2 ++
src/mesa/main/get_hash_params.py | 8 +++++++-
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index 0c1782a..30da5d4 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -272,6 +272,15 @@
#define MAX_DEBUG_GROUP_STACK_DEPTH 64
/*@}*/
+/** For GL_ARB_gpu_shader5 */
+/*@{*/
+#define MAX_GEOMETRY_SHADER_INVOCATIONS 32
+#define MIN_FRAGMENT_INTERPOLATION_OFFSET -0.5
+#define MAX_FRAGMENT_INTERPOLATION_OFFSET 0.5
+#define FRAGMENT_INTERPOLATION_OFFSET_BITS 4
+#define MAX_VERTEX_STREAMS 4
+/*@}*/
+
/*
* Color channel component order
*
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 4435c09..30ae529 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -395,6 +395,8 @@ EXTRA_EXT(ARB_shader_atomic_counters);
EXTRA_EXT(ARB_draw_indirect);
EXTRA_EXT(ARB_shader_image_load_store);
EXTRA_EXT(ARB_viewport_array);
+EXTRA_EXT(ARB_gpu_shader5);
+EXTRA_EXT2(ARB_transform_feedback3, ARB_gpu_shader5);
static const int
extra_ARB_color_buffer_float_or_glcore[] = {
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index b45e143..1be0434 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -643,7 +643,7 @@ descriptor=[
# GL_ARB_transform_feedback3
[ "MAX_TRANSFORM_FEEDBACK_BUFFERS", "CONTEXT_INT(Const.MaxTransformFeedbackBuffers), extra_ARB_transform_feedback3" ],
- [ "MAX_VERTEX_STREAMS", "CONTEXT_INT(Const.MaxVertexStreams), extra_ARB_transform_feedback3" ],
+ [ "MAX_VERTEX_STREAMS", "CONTEXT_INT(Const.MaxVertexStreams), extra_ARB_transform_feedback3_ARB_gpu_shader5" ],
# GL_ARB_geometry_shader4
[ "MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits), extra_gl32_ARB_geometry_shader4" ],
@@ -751,6 +751,12 @@ descriptor=[
[ "MAX_GEOMETRY_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_GEOMETRY].MaxImageUniforms), extra_ARB_shader_image_load_store_and_geometry_shader"],
[ "MAX_FRAGMENT_IMAGE_UNIFORMS", "CONTEXT_INT(Const.Program[MESA_SHADER_FRAGMENT].MaxImageUniforms), extra_ARB_shader_image_load_store"],
[ "MAX_COMBINED_IMAGE_UNIFORMS", "CONTEXT_INT(Const.MaxCombinedImageUniforms), extra_ARB_shader_image_load_store"],
+
+# GL_ARB_gpu_shader5
+ [ "MAX_GEOMETRY_SHADER_INVOCATIONS", "CONST(MAX_GEOMETRY_SHADER_INVOCATIONS), extra_ARB_gpu_shader5" ],
+ [ "MIN_FRAGMENT_INTERPOLATION_OFFSET", "NORM_CONST(MIN_FRAGMENT_INTERPOLATION_OFFSET), extra_ARB_gpu_shader5" ],
+ [ "MAX_FRAGMENT_INTERPOLATION_OFFSET", "NORM_CONST(MAX_FRAGMENT_INTERPOLATION_OFFSET), extra_ARB_gpu_shader5" ],
+ [ "FRAGMENT_INTERPOLATION_OFFSET_BITS", "CONST(FRAGMENT_INTERPOLATION_OFFSET_BITS), extra_ARB_gpu_shader5" ],
]},
# Enums restricted to OpenGL Core profile
--
1.8.5.3
More information about the mesa-dev
mailing list