mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 10:10:09 +01:00
nvk: Remove plane sources from tex instructions
The plane source is entirely handled by lower_tex() so there's no need to keep it around. Codegen currently just ignores these but NAK will assert if it sees an unknown source type. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24549>
This commit is contained in:
parent
ac00f5a361
commit
4f217e9670
1 changed files with 4 additions and 6 deletions
|
|
@ -360,12 +360,10 @@ lower_tex(nir_builder *b, nir_tex_instr *tex,
|
|||
nir_src_as_deref(tex->src[sampler_src_idx].src);
|
||||
assert(texture);
|
||||
|
||||
const int plane_src_idx =
|
||||
nir_tex_instr_src_index(tex, nir_tex_src_plane);
|
||||
|
||||
uint32_t plane = (plane_src_idx < 0) ? 0 :
|
||||
nir_src_as_uint(tex->src[plane_src_idx].src);
|
||||
uint64_t plane_offset_B = plane * sizeof(struct nvk_image_descriptor);
|
||||
nir_ssa_def *plane_ssa = nir_steal_tex_src(tex, nir_tex_src_plane);
|
||||
const uint32_t plane =
|
||||
plane_ssa ? nir_src_as_uint(nir_src_for_ssa(plane_ssa)) : 0;
|
||||
const uint64_t plane_offset_B = plane * sizeof(struct nvk_image_descriptor);
|
||||
|
||||
nir_ssa_def *combined_handle;
|
||||
if (texture == sampler) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue