summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3dx_state.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-01-18 15:36:15 -0800
committerEric Anholt <[email protected]>2019-01-27 08:30:03 -0800
commit3e743d8cd86c09f68d840604c9df52e0499af64f (patch)
treeec11fa44b3d524ef06137c775b3dbf7868326504 /src/gallium/drivers/v3d/v3dx_state.c
parentfe6a21c8671b7b3deea281cb0b9617f3ce7fc5c5 (diff)
v3d: Avoid duplicating limits defines between gallium and v3d core.
We don't want to pull the compiler into every include in the gallium driver, so just make a new little header to store the limits.
Diffstat (limited to 'src/gallium/drivers/v3d/v3dx_state.c')
-rw-r--r--src/gallium/drivers/v3d/v3dx_state.c5
1 files changed, 3 insertions, 2 deletions
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;