nir/lower_tex: Add support for lowering coordinate offsets
On i965, we can't support coordinate offsets for texelFetch or rectangle textures. Previously, we were doing this with a GLSL pass but we need to do it in NIR if we want those workarounds for SPIR-V. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-dev@lists.freedesktop.org>
This commit is contained in:
@@ -2408,6 +2408,16 @@ typedef struct nir_lower_tex_options {
|
||||
*/
|
||||
unsigned lower_txp;
|
||||
|
||||
/**
|
||||
* If true, lower away nir_tex_src_offset for all texelfetch instructions.
|
||||
*/
|
||||
bool lower_txf_offset;
|
||||
|
||||
/**
|
||||
* If true, lower away nir_tex_src_offset for all rect textures.
|
||||
*/
|
||||
bool lower_rect_offset;
|
||||
|
||||
/**
|
||||
* If true, lower rect textures to 2D, using txs to fetch the
|
||||
* texture dimensions and dividing the texture coords by the
|
||||
|
Reference in New Issue
Block a user