mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
ac/nir: always round cube array layers
It seems this is still necessary if conformant_trunc_coord=true. Fixes various dEQP-VK.texture.shadow.cube_array.* and dEQP-VK.glsl.texture_functions.texture*samplercubearray* failures with conformant_trunc_coord. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Cc: 23.2 <mesa-stable> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24137>
This commit is contained in:
parent
e02f8b62af
commit
d4b211bf1b
2 changed files with 3 additions and 2 deletions
|
|
@ -320,7 +320,7 @@ typedef struct {
|
|||
enum amd_gfx_level gfx_level;
|
||||
|
||||
/* If true, round the layer component of the coordinates source to the nearest
|
||||
* integer for all array ops.
|
||||
* integer for all array ops. This is always done for cube array ops.
|
||||
*/
|
||||
bool lower_array_layer_round_even;
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,8 @@ lower_tex_coords(nir_builder *b, nir_tex_instr *tex, nir_ssa_def **coords,
|
|||
const ac_nir_lower_tex_options *options)
|
||||
{
|
||||
bool progress = false;
|
||||
if (options->lower_array_layer_round_even && tex->is_array && tex->op != nir_texop_lod)
|
||||
if ((options->lower_array_layer_round_even || tex->sampler_dim == GLSL_SAMPLER_DIM_CUBE) &&
|
||||
tex->is_array && tex->op != nir_texop_lod)
|
||||
progress |= lower_array_layer_round_even(b, tex, coords);
|
||||
|
||||
if (tex->sampler_dim != GLSL_SAMPLER_DIM_CUBE &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue