mesa
mesa copied to clipboard
vc4: Avoid unpack/repack of writing texture fetches to the output color.
See glsl-fs-texture2d.shader_test
As a start for this one, we should probably move our unorm4x8 unpacking into a NIR lowering pass.
The trouble is going to be that NIR tex instructions return a result sized implicitly according to the texture instruction, while we would want the NIR tex instruction to return a driver-dependent number of components (usually 1, but maybe 2 for FP16). Maybe this could be a field in the instruction, filled by default at instruction creation time according to the current rules but overridden by the driver's lowering.