diff options
Diffstat (limited to 'src/gallium/drivers/v3d')
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_context.h | 5 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3d_screen.h | 6 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_state.c | 5 |
6 files changed, 9 insertions, 12 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.c b/src/gallium/drivers/v3d/v3d_context.c index 7e9bc3d22db..d07ad403590 100644 --- a/src/gallium/drivers/v3d/v3d_context.c +++ b/src/gallium/drivers/v3d/v3d_context.c @@ -37,6 +37,7 @@ #include "v3d_screen.h" #include "v3d_context.h" #include "v3d_resource.h" +#include "broadcom/compiler/v3d_compiler.h" void v3d_flush(struct pipe_context *pctx) diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h index 2ced7c8aa31..3ec4940b648 100644 --- a/src/gallium/drivers/v3d/v3d_context.h +++ b/src/gallium/drivers/v3d/v3d_context.h @@ -38,6 +38,7 @@ #include "xf86drm.h" #include "v3d_drm.h" #include "v3d_screen.h" +#include "broadcom/common/v3d_limits.h" struct v3d_job; struct v3d_bo; @@ -190,10 +191,10 @@ struct v3d_vertexbuf_stateobj { }; struct v3d_vertex_stateobj { - struct pipe_vertex_element pipe[V3D_MAX_ATTRIBUTES]; + struct pipe_vertex_element pipe[V3D_MAX_VS_INPUTS / 4]; unsigned num_elements; - uint8_t attrs[16 * V3D_MAX_ATTRIBUTES]; + uint8_t attrs[16 * (V3D_MAX_VS_INPUTS / 4)]; struct pipe_resource *defaults; uint32_t defaults_offset; }; diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index 81392c9ff83..bed2c63a64d 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -262,7 +262,7 @@ v3d_screen_get_shader_param(struct pipe_screen *pscreen, unsigned shader, if (shader == PIPE_SHADER_FRAGMENT) return V3D_MAX_FS_INPUTS / 4; else - return V3D_MAX_ATTRIBUTES; + return V3D_MAX_VS_INPUTS / 4; case PIPE_SHADER_CAP_MAX_OUTPUTS: if (shader == PIPE_SHADER_FRAGMENT) return 4; diff --git a/src/gallium/drivers/v3d/v3d_screen.h b/src/gallium/drivers/v3d/v3d_screen.h index 0975da2032f..94ae8b30f3a 100644 --- a/src/gallium/drivers/v3d/v3d_screen.h +++ b/src/gallium/drivers/v3d/v3d_screen.h @@ -35,12 +35,6 @@ struct v3d_bo; -#define V3D_MAX_MIP_LEVELS 12 -#define V3D_MAX_TEXTURE_SAMPLERS 32 -#define V3D_MAX_SAMPLES 4 -#define V3D_MAX_DRAW_BUFFERS 4 -#define V3D_MAX_ATTRIBUTES 16 - /* These are tunable parameters in the HW design, but all the V3D * implementations agree. */ diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c index 5ad4710876f..2700208e388 100644 --- a/src/gallium/drivers/v3d/v3dx_draw.c +++ b/src/gallium/drivers/v3d/v3dx_draw.c @@ -317,7 +317,7 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d, attr.maximum_index = 0xffffff; #endif } - STATIC_ASSERT(sizeof(vtx->attrs) >= V3D_MAX_ATTRIBUTES * size); + STATIC_ASSERT(sizeof(vtx->attrs) >= V3D_MAX_VS_INPUTS / 4 * size); } if (vtx->num_elements == 0) { diff --git a/src/gallium/drivers/v3d/v3dx_state.c b/src/gallium/drivers/v3d/v3dx_state.c index b66569c25e7..47b7ad03cc3 100644 --- a/src/gallium/drivers/v3d/v3dx_state.c +++ b/src/gallium/drivers/v3d/v3dx_state.c @@ -35,6 +35,7 @@ #include "v3d_context.h" #include "v3d_tiling.h" #include "broadcom/common/v3d_macros.h" +#include "broadcom/compiler/v3d_compiler.h" #include "broadcom/cle/v3dx_pack.h" static void @@ -407,10 +408,10 @@ v3d_vertex_state_create(struct pipe_context *pctx, unsigned num_elements, */ uint32_t *attrs; u_upload_alloc(v3d->state_uploader, 0, - V3D_MAX_ATTRIBUTES * 4 * sizeof(float), 16, + V3D_MAX_VS_INPUTS * sizeof(float), 16, &so->defaults_offset, &so->defaults, (void **)&attrs); - for (int i = 0; i < V3D_MAX_ATTRIBUTES; i++) { + for (int i = 0; i < V3D_MAX_VS_INPUTS / 4; i++) { attrs[i * 4 + 0] = 0; attrs[i * 4 + 1] = 0; attrs[i * 4 + 2] = 0; |