OSDN Git Service

anv/pipeline: use unsigned long long constant to check enable vertex inputs
authorJuan A. Suarez Romero <jasuarez@igalia.com>
Thu, 13 Jul 2017 14:33:57 +0000 (14:33 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 2 Aug 2017 23:19:06 +0000 (00:19 +0100)
commit4b21754073079f17056739a6fddaada03368170b
tree3418dd44ff938ff857bf24f368d5314c8a461bb5
parent68ebae30dfc895bfe769d0555a01681e40c8bbaf
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 <lionel.g.landwerlin@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit 28d0c38d85d94cab23667049f03ea072b8e7907c)
src/intel/vulkan/anv_pipeline.c