microsoft/spirv_to_dxil: lower cube-images to 2d arrays

textureLoad() doesn't work on cube images. We need to lower cube
images to 2D arrays.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16904>
This commit is contained in:
Erik Faye-Lund 2022-06-10 08:35:40 +02:00 committed by Marge Bot
parent 00837c6bef
commit 5288fe31b4
1 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@
#include "spirv_to_dxil.h"
#include "nir_to_dxil.h"
#include "dxil_nir.h"
#include "dxil_nir_lower_int_cubemaps.h"
#include "shader_enums.h"
#include "spirv/nir_spirv.h"
#include "util/blob.h"
@ -668,6 +669,7 @@ dxil_spirv_nir_passes(nir_shader *nir,
{
glsl_type_singleton_init_or_ref();
NIR_PASS_V(nir, dxil_nir_lower_int_cubemaps, false);
NIR_PASS_V(nir, nir_lower_io_to_vector,
nir_var_shader_out |
(nir->info.stage != MESA_SHADER_VERTEX ? nir_var_shader_in : 0));