nir: Move V3D's "the shader was TGSI, ignore FS output types" flag to NIR.
authorEric Anholt <eric@anholt.net>
Tue, 5 Feb 2019 18:22:30 +0000 (10:22 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 5 Feb 2019 20:12:33 +0000 (12:12 -0800)
commitaaef12702f3b3a9e0464468948b1cbfaf4a66cd2
tree9c4762e7e55b4108a7d4b25764952df89329f15a
parent8943eb8f03fe67710ce65fc0a54024751ff2b5bd
nir: Move V3D's "the shader was TGSI, ignore FS output types" flag to NIR.

Ken's rework of mesa/st builtins to NIR means that we'll have more NIR
shaders with color output types that are mismatched with the render target
types.  Since this is behavior that GLSL doesn't require, add it as a
shader_info option so the driver can know that it needs to ignore the FS
output's base type in favor of the actual render target's.  This prevents
needing additional variants in several mesa/st paths (clear, pbo upload,
pbo download), given that the driver already has to handle the variants
for any TGSI being passed to it (from u_blitter, for example).

Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/compiler/shader_info.h
src/gallium/auxiliary/nir/tgsi_to_nir.c
src/gallium/drivers/v3d/v3d_context.h
src/gallium/drivers/v3d/v3d_program.c