radeonsi: Fix array indices for detecting integer vertex formats

(cherry picked from commit f34ad85765)
This commit is contained in:
Michel Dänzer 2013-02-12 17:49:36 +01:00 committed by Michel Dänzer
parent baa9070346
commit 14372a70ec

View file

@ -2494,7 +2494,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;
@ -2502,7 +2502,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;