[Mesa-dev] [PATCH V3 2/4] r600g: add MAX_VERTEX_ATTRIB_STRIDE
Timothy Arceri
t_arceri at yahoo.com.au
Tue Aug 19 22:46:56 PDT 2014
Signed-off-by: Timothy Arceri <t_arceri at yahoo.com.au>
---
Note: I have not tested that this patch works as I dont
have access to the hardware.
src/gallium/drivers/r600/r600_pipe.c | 3 +++
src/gallium/include/pipe/p_defines.h | 1 +
src/mesa/state_tracker/st_extensions.c | 3 +++
3 files changed, 7 insertions(+)
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c
index e02c053..2e134b0 100644
--- a/src/gallium/drivers/r600/r600_pipe.c
+++ b/src/gallium/drivers/r600/r600_pipe.c
@@ -339,6 +339,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
case PIPE_CAP_MAX_VERTEX_STREAMS:
return 1;
+ case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE;
+ return 2047;
+
/* Texturing. */
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h
index 04e4798..aae8229 100644
--- a/src/gallium/include/pipe/p_defines.h
+++ b/src/gallium/include/pipe/p_defines.h
@@ -569,6 +569,7 @@ enum pipe_cap {
PIPE_CAP_VIDEO_MEMORY = 106,
PIPE_CAP_UMA = 107,
PIPE_CAP_CONDITIONAL_RENDER_INVERTED = 108,
+ PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE = 109,
};
#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 4110eb5..9db648c 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -289,6 +289,9 @@ void st_init_limits(struct pipe_screen *screen,
/* The vertex stream must fit into pipe_stream_output_info::stream */
assert(c->MaxVertexStreams <= 4);
+ c->MaxVertexAttribStride
+ = screen->get_param(screen, PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE);
+
c->StripTextureBorder = GL_TRUE;
c->GLSLSkipStrictMaxUniformLimitCheck =
--
1.9.3
More information about the mesa-dev
mailing list