-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
min16float3 support bug? #7013
Comments
I'm not sure what you mean by:
The DXIL you provided looks accurate to me, where each of the cbuffer elements is laid out as if the min16float values occupy 32-bits (because they do), and the compiler can load those into If instead you used Closing since this seems to all be correct. If you have further questions please re-open. |
Yeah, I also think so, but what i tested is not the case. for example cbuffer Foo
{
minfloat4 a;
} when update the constants buffer, what i expected is to use a float4 value to update, but actually i have to use a float16_t4 value to update the constant buffer, It seems like that I enabled -enable-16bit-types, but as the dxil says ; Note: shader requires additional functionality:
; Minimum-precision data types which indicates that I didn't use -enable-16bit-types. What i expected is what you mentioned above, it has the same behavior as vulkan's relaxed precision. Or the driver did something that violates the spec? What you mean by the driver can reduce them down to 16-bit types? read from and float and then convert float to float16_t? Also: It says I don't have permission to open the issue. |
Description
When i test min16float3 support without -enable-16bit-types , the dxil says the size of min16float is 2 bytes and algiment is 4 bytes, but when it uses
%dx.types.CBufRet.f16 @dx.op.cbufferLoadLegacy.f16(i32 59, %dx.types.Handle %Foo_cbuffer, i32 0) to load the data, in theory the adress would be index * 4 bytes(alignment),but when i test the shader on rtx 4080, the adress is caculated with index * 2byes(min16float size), is this a bug or am missing something?
Steps to Reproduce
shader source:
dxil:
Actual Behavior
the value from min16float3 is not as expected, only min16float3.x is correct, .yz is not correct caused by fetching data from wrong offset
Environment
The text was updated successfully, but these errors were encountered: