summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2019-02-15 18:02:46 +0100
committerBas Nieuwenhuizen <[email protected]>2019-02-15 20:24:16 +0000
commit4b03a19a0b052fc2fd9c8169891b3fe22a85a1b4 (patch)
treedd0c0663c0a221dc052be59a7804c30f99467896 /src/amd
parent979b43b347803cd7beafaa94e5e550b2e2cfdbab (diff)
radv: Use correct num formats to detect whether we should be use 1.0 or 1.
normalized and scaled formats also return floats. Fixes: 4b3549c0846 ("radv: reduce the number of loaded channels for vertex input fetches") Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_nir_to_llvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c b/src/amd/vulkan/radv_nir_to_llvm.c
index f1fc392292a..b4b09c9fed6 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -2118,7 +2118,8 @@ handle_vs_input_decl(struct radv_shader_context *ctx,
unsigned attrib_format = ctx->options->key.vs.vertex_attribute_formats[attrib_index];
unsigned data_format = attrib_format & 0x0f;
unsigned num_format = (attrib_format >> 4) & 0x07;
- bool is_float = num_format == V_008F0C_BUF_NUM_FORMAT_FLOAT;
+ bool is_float = num_format != V_008F0C_BUF_NUM_FORMAT_UINT &&
+ num_format != V_008F0C_BUF_NUM_FORMAT_SINT;
if (ctx->options->key.vs.instance_rate_inputs & (1u << attrib_index)) {
uint32_t divisor = ctx->options->key.vs.instance_rate_divisors[attrib_index];