mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-12-08 21:26:17 +00:00
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.
20 lines
465 B
HLSL
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;
|
|
}
|