wgpu/naga/tests/out/hlsl/wgsl-functions-optimized-by-version.hlsl
Robert Bamler bb83976ddb Optimize dot4{I, U}8Packed for all spv versions
Emit optimized code for `dot4{I, U}8Packed` regardless of SPIR-V version
as long as the required capabilities are available. On SPIR-V < 1.6,
require the extension "SPV_KHR_integer_dot_product" for this. On
SPIR-V >= 1.6, don't require the extension because the corresponding
capabilities are part of SPIR-V >= 1.6 proper.
2025-04-28 16:37:45 +02:00

20 lines
465 B
HLSL

uint test_packed_integer_dot_product()
{
int c_5_ = dot4add_i8packed(1u, 2u, 0);
uint c_6_ = dot4add_u8packed(3u, 4u, 0);
uint _e7 = (5u + c_6_);
uint _e9 = (6u + c_6_);
int c_7_ = dot4add_i8packed(_e7, _e9, 0);
uint _e12 = (7u + c_6_);
uint _e14 = (8u + c_6_);
uint c_8_ = dot4add_u8packed(_e12, _e14, 0);
return c_8_;
}
[numthreads(1, 1, 1)]
void main()
{
const uint _e0 = test_packed_integer_dot_product();
return;
}