You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
struct ResourceHandleData {
uint index : 23;
uint tag : 3;
uint version : 6;
};
It should be represented as a 32 bit uint. When ResourceHandleData is read from a push constant slot, a validation layer error is given by the Vulkan validation layer that the specific push constant (which should contain the RenderHandleData in my case) is out of range, following with a device removal.
However this behavior works perfectly fine when using DXIL, my assumption is that bitfield members are not properly represented when used in combination with push constants. I have yet to test this with non-pushconstants however, but that may also be broken.
EDIT: Simple casting from uint to ResourceHandleData from a different location other then push constants also causes the same broken behavior.
The text was updated successfully, but these errors were encountered:
DBouma
changed the title
[SPIR-V] Bitfield members are broken when used in push constants
[SPIR-V] Bitfield members are broken when used in combination with push constants
Feb 23, 2022
DBouma
changed the title
[SPIR-V] Bitfield members are broken when used in combination with push constants
[SPIR-V] Bitfield members are broken
Feb 24, 2022
Given the following struct:
It should be represented as a 32 bit uint. When
ResourceHandleData
is read from a push constant slot, a validation layer error is given by the Vulkan validation layer that the specific push constant (which should contain theRenderHandleData
in my case) is out of range, following with a device removal.However this behavior works perfectly fine when using DXIL,
my assumption is that bitfield members are not properly represented when used in combination with push constants. I have yet to test this with non-pushconstants however, but that may also be broken.EDIT: Simple casting from uint to
ResourceHandleData
from a different location other then push constants also causes the same broken behavior.The text was updated successfully, but these errors were encountered: