summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi/si_state.c
diff options
context:
space:
mode:
authorMichel Dänzer <[email protected]>2013-02-12 17:49:36 +0100
committerMichel Dänzer <[email protected]>2013-02-14 10:31:21 +0100
commitf34ad857658c93c8f42bd2ed77033e2dfb2540e3 (patch)
treed5f9bbca503c33c529d01ac9fb5d2595db22d65b /src/gallium/drivers/radeonsi/si_state.c
parent0d5ce524abdf7e655ed20f7f82a89c9ba4de5e09 (diff)
radeonsi: Fix array indices for detecting integer vertex formats
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 74284690f04..5cca08579ed 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2520,7 +2520,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx,
case UTIL_FORMAT_TYPE_SIGNED:
if (desc->channel[first_non_void].normalized)
num_format = V_008F0C_BUF_NUM_FORMAT_SNORM;
- else if (desc->channel[i].pure_integer)
+ else if (desc->channel[first_non_void].pure_integer)
num_format = V_008F0C_BUF_NUM_FORMAT_SINT;
else
num_format = V_008F0C_BUF_NUM_FORMAT_SSCALED;
@@ -2528,7 +2528,7 @@ static void *si_create_vertex_elements(struct pipe_context *ctx,
case UTIL_FORMAT_TYPE_UNSIGNED:
if (desc->channel[first_non_void].normalized)
num_format = V_008F0C_BUF_NUM_FORMAT_UNORM;
- else if (desc->channel[i].pure_integer)
+ else if (desc->channel[first_non_void].pure_integer)
num_format = V_008F0C_BUF_NUM_FORMAT_UINT;
else
num_format = V_008F0C_BUF_NUM_FORMAT_USCALED;