No. The image descriptor really has 8 dwords, therefore the slot can contain either a texture or a buffer, but not both.
The "NULL" descriptor is different for buffers and textures, therefore it seemed textures and buffers couldn't occupy the same slot if we wanted to have both. Since the last 4 dwords have no effect on a NULL texture, the descriptor of a NULL buffer can be there. That's the motivation for moving the buffer descriptor. Marek On Sun, Feb 1, 2015 at 6:50 PM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Sun, Feb 1, 2015 at 12:37 PM, Marek Olšák <mar...@gmail.com> wrote: >> From: Marek Olšák <marek.ol...@amd.com> >> >> This will allow supporting NULL textures. >> --- >> src/gallium/drivers/radeonsi/si_descriptors.c | 2 +- >> src/gallium/drivers/radeonsi/si_pipe.h | 2 ++ >> src/gallium/drivers/radeonsi/si_shader.c | 4 ++-- >> src/gallium/drivers/radeonsi/si_state.c | 8 ++++---- >> 4 files changed, 9 insertions(+), 7 deletions(-) >> >> diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c >> b/src/gallium/drivers/radeonsi/si_descriptors.c >> index 573787a..15b4da1 100644 >> --- a/src/gallium/drivers/radeonsi/si_descriptors.c >> +++ b/src/gallium/drivers/radeonsi/si_descriptors.c >> @@ -1063,7 +1063,7 @@ static void si_invalidate_buffer(struct pipe_context >> *ctx, struct pipe_resource >> /* Texture buffers - update virtual addresses in sampler view >> descriptors. */ >> LIST_FOR_EACH_ENTRY(view, &sctx->b.texture_buffers, list) { >> if (view->base.texture == buf) { >> - si_desc_reset_buffer_offset(ctx, view->state, >> old_va, buf); >> + si_desc_reset_buffer_offset(ctx, &view->state[4], >> old_va, buf); >> } >> } >> /* Texture buffers - update bindings. */ >> diff --git a/src/gallium/drivers/radeonsi/si_pipe.h >> b/src/gallium/drivers/radeonsi/si_pipe.h >> index b88f154..d2edcdf 100644 >> --- a/src/gallium/drivers/radeonsi/si_pipe.h >> +++ b/src/gallium/drivers/radeonsi/si_pipe.h >> @@ -90,6 +90,8 @@ struct si_sampler_view { >> struct pipe_sampler_view base; >> struct list_head list; >> struct r600_resource *resource; >> + /* [0..7] = image descriptor > > Did you mean 0..3? > >> + * [4..7] = buffer descriptor */ >> uint32_t state[8]; >> uint32_t fmask_state[8]; >> }; _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev