summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJuan A. Suarez Romero <[email protected]>2017-07-13 14:33:57 +0000
committerJuan A. Suarez Romero <[email protected]>2017-07-14 08:09:18 +0000
commit28d0c38d85d94cab23667049f03ea072b8e7907c (patch)
tree96b212b564e0941449651b08a55112d5b21af90e /src/intel
parentb2da1238012c751a8ad36c9a51d3fec46a292b0d (diff)
anv/pipeline: use unsigned long long constant to check enable vertex inputs
When initializing the ANV pipeline, one of the tasks is checking which vertex inputs are enabled. This is done by checking if the enabled bits in inputs_read. But the mask to use is computed doing `(1 << (VERT_ATTRIB_GENERIC0 + desc->location))`. The problem here is that if location is 15 or greater, the sum is 32 or greater. But C is handling 1 as a 32-bit integer, which means the displaced bit is out of range and thus the full value is 0. Thus, use 1ull, which is an unsigned long long value. This fixes: dEQP-VK.pipeline.vertex_input.max_attributes.16_attributes.binding_one_to_one.interleaved v2: use 1ull instead of BITFIELD64_BIT() (Matt Turner) Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Juan A. Suarez Romero <[email protected]> Cc: [email protected]
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_pipeline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c
index 5494a6ee75e..edbe2e7a7ac 100644
--- a/src/intel/vulkan/anv_pipeline.c
+++ b/src/intel/vulkan/anv_pipeline.c
@@ -1330,7 +1330,7 @@ anv_pipeline_init(struct anv_pipeline *pipeline,
const VkVertexInputAttributeDescription *desc =
&vi_info->pVertexAttributeDescriptions[i];
- if (inputs_read & (1 << (VERT_ATTRIB_GENERIC0 + desc->location)))
+ if (inputs_read & BITFIELD64_BIT(VERT_ATTRIB_GENERIC0 + desc->location))
pipeline->vb_used |= 1 << desc->binding;
}