This repository has been archived by the owner on Jan 29, 2025. It is now read-only.
[spv-out] ZeroValue
expressions produce too many OpConstantNull
instructions
#2334
Labels
area: back-end
Outputs of shader conversion
good first issue
Good for newcomers
lang: SPIR-V
Binary SPIR-V input and output
type: enhancement
#2332 introduces
Expression::ZeroValue
, which the SPIR-V backend uses to produceOpConstantNull
instructions. However, it doesn't check to see if it's already got an an appropriate null constant for the given type, resulting in code like this:Only three of these are necessary.
This example appears is in the snapshot output
tests/out/spv/bounds-check-image-rzsw.spvasm
.The text was updated successfully, but these errors were encountered: