mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
nir/lower_tex: add txp lowering option for arrays
this is illegal in vulkan, so zink needs to be able to lower these Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15510>
This commit is contained in:
parent
821c141f9d
commit
4e35ed8c67
2 changed files with 7 additions and 1 deletions
|
|
@ -4823,6 +4823,11 @@ typedef struct nir_lower_tex_options {
|
|||
*/
|
||||
unsigned lower_txp;
|
||||
|
||||
/**
|
||||
* If true, lower texture projector for any array sampler dims
|
||||
*/
|
||||
bool lower_txp_array;
|
||||
|
||||
/**
|
||||
* If true, lower away nir_tex_src_offset for all texelfetch instructions.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1319,7 +1319,8 @@ nir_lower_tex_block(nir_block *block, nir_builder *b,
|
|||
/* If we are clamping any coords, we must lower projector first
|
||||
* as clamping happens *after* projection:
|
||||
*/
|
||||
if (lower_txp || sat_mask) {
|
||||
if (lower_txp || sat_mask ||
|
||||
(options->lower_txp_array && tex->is_array)) {
|
||||
progress |= project_src(b, tex);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue