diff options
author | Charmaine Lee <[email protected]> | 2017-07-18 16:13:48 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-07-22 13:18:56 -0600 |
commit | 83ca6b9d31005a11380f9dbd1b5531294f5c3e92 (patch) | |
tree | 4bf83f35d20fdc697ab2ec9fc7eb13258a8099cd | |
parent | acfb1583a560339b500a94bc13bf73675e7ed422 (diff) |
svga: fix constant indices for texcoord scale factors and texture buffer size
This patch fixes the ordering of the constant indices for texcoord scale
factor and texture buffer size to match the order they were added to the
constant buffer in svga_get_extra_constants_common().
Tested with MTT piglit, glretrace.
Reviewed-by: Brian Paul <[email protected]>
-rw-r--r-- | src/gallium/drivers/svga/svga_tgsi_vgpu10.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c index 93a76ef49f1..71dafe75d18 100644 --- a/src/gallium/drivers/svga/svga_tgsi_vgpu10.c +++ b/src/gallium/drivers/svga/svga_tgsi_vgpu10.c @@ -2881,17 +2881,14 @@ emit_constant_declaration(struct svga_shader_emitter_v10 *emit) } } - /* Texcoord scale factors for RECT textures */ - { - for (i = 0; i < emit->num_samplers; i++) { - if (emit->key.tex[i].unnormalized) { - emit->texcoord_scale_index[i] = total_consts++; - } + for (i = 0; i < emit->num_samplers; i++) { + + /* Texcoord scale factors for RECT textures */ + if (emit->key.tex[i].unnormalized) { + emit->texcoord_scale_index[i] = total_consts++; } - } - /* Texture buffer sizes */ - for (i = 0; i < emit->num_samplers; i++) { + /* Texture buffer sizes */ if (emit->sampler_target[i] == TGSI_TEXTURE_BUFFER) { emit->texture_buffer_size_index[i] = total_consts++; } |