Skip to content

zink: Output PackHalf2x16 to uint not float

Fixes InconsistentSpirv validation errors reporting that PackHalf2x16 outputs uint rather than float.

For example the previous code generates the following SPIR-V with PackHalf2x16 output as a float:

%2018 = OpExtInst %float %1 PackHalf2x16 %2017
%2019 = OpBitcast %uint %2018

The new code generates:

%2018 = OpExtInst %uint %1 PackHalf2x16 %2017

Didn't cause any obvious problems but was distracting when trying to track down unrelated problems.

Tested on Windows 10 w/ Nvidia RTX 2070 SUPER, driver 496.49 running Superposition and the Mesa test suite.

@zmike

Thanks, Charles

Merge request reports