nir: Add nir_lower_tex support for Broadcom's swizzled TG4 results.

V3D returns the texels in a different order in the resulting vec4 from
what GLSL wants, so we need to put in a swizzle.  Fixes
dEQP-GLES31.functional.texture.gather.basic.2d.rgba8.base_level.level_1

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Eric Anholt
2018-12-26 22:45:04 -08:00
parent 3fcec4a550
commit 6051c11d17
3 changed files with 28 additions and 0 deletions

View File

@@ -3085,6 +3085,12 @@ typedef struct nir_lower_tex_options {
*/
bool lower_txd_offset_clamp;
/**
* If true, apply a .bagr swizzle on tg4 results to handle Broadcom's
* mixed-up tg4 locations.
*/
bool lower_tg4_broadcom_swizzle;
enum nir_lower_tex_packing lower_tex_packing[32];
} nir_lower_tex_options;