summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/tgsi/tgsi_exec.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-06-10 14:19:10 +1000
committerDave Airlie <airlied@redhat.com>2014-06-11 12:21:04 +1000
commit7ea04f089b7379d110f81b4d83464352980a3217 (patch)
tree37d5a127140682b7a4450cc20b16a62ba9ef0e00 /src/gallium/auxiliary/tgsi/tgsi_exec.c
parent740d5bed77120aba4d815b5e2d28b109f214a800 (diff)
downloadexternal_mesa3d-7ea04f089b7379d110f81b4d83464352980a3217.zip
external_mesa3d-7ea04f089b7379d110f81b4d83464352980a3217.tar.gz
external_mesa3d-7ea04f089b7379d110f81b4d83464352980a3217.tar.bz2
tgsi_exec: use defines for max inputs/outputs
This fixes the limits for GL 3.2, and subsequently fixes some segfaults in some varying packing tests and max varying tests after the limits bumped. Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_exec.c')
-rw-r--r--src/gallium/auxiliary/tgsi/tgsi_exec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c
index 19412af..d848348 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_exec.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_exec.c
@@ -689,7 +689,7 @@ tgsi_exec_machine_bind_shader(
struct tgsi_exec_vector *outputs;
inputs = align_malloc(sizeof(struct tgsi_exec_vector) *
- TGSI_MAX_PRIM_VERTICES * PIPE_MAX_ATTRIBS,
+ TGSI_MAX_PRIM_VERTICES * PIPE_MAX_SHADER_INPUTS,
16);
if (!inputs)
@@ -828,8 +828,8 @@ tgsi_exec_machine_create( void )
mach->MaxGeometryShaderOutputs = TGSI_MAX_TOTAL_VERTICES;
mach->Predicates = &mach->Temps[TGSI_EXEC_TEMP_P0];
- mach->Inputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16);
- mach->Outputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_ATTRIBS, 16);
+ mach->Inputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_SHADER_INPUTS, 16);
+ mach->Outputs = align_malloc(sizeof(struct tgsi_exec_vector) * PIPE_MAX_SHADER_OUTPUTS, 16);
if (!mach->Inputs || !mach->Outputs)
goto fail;