aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600/r600_pipe_common.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-11-15 09:47:03 +1000
committerDave Airlie <[email protected]>2017-11-17 11:31:40 +1000
commitac4f175d79c85fd4910f99ef945069ff681bd7fd (patch)
treed63d1f75b8f192ba73a75861e99ce3185d4d150d /src/gallium/drivers/r600/r600_pipe_common.h
parent77d36cbc8de85ea5c4e8caf071cbc6661e0cd75c (diff)
r600: allocate immed buffer resource for images.
In order to image readback we have to execute a MEM_RAT instruction that needs a buffer to transfer the result into until the shader can fetch it. Tested-By: Gert Wollny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe_common.h')
-rw-r--r--src/gallium/drivers/r600/r600_pipe_common.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe_common.h b/src/gallium/drivers/r600/r600_pipe_common.h
index a6406cfdb23..c8b971a5e47 100644
--- a/src/gallium/drivers/r600/r600_pipe_common.h
+++ b/src/gallium/drivers/r600/r600_pipe_common.h
@@ -171,6 +171,12 @@ struct r600_resource {
/* Whether this resource is referenced by bindless handles. */
bool texture_handle_allocated;
bool image_handle_allocated;
+
+ /*
+ * EG/Cayman only - for RAT operations hw need an immediate buffer
+ * to store results in.
+ */
+ struct r600_resource *immed_buffer;
};
struct r600_transfer {
@@ -773,6 +779,9 @@ void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
const union pipe_color_union *color);
void r600_init_screen_texture_functions(struct r600_common_screen *rscreen);
void r600_init_context_texture_functions(struct r600_common_context *rctx);
+void eg_resource_alloc_immed(struct r600_common_screen *rscreen,
+ struct r600_resource *res,
+ unsigned immed_size);
/* r600_viewport.c */
void evergreen_apply_scissor_bug_workaround(struct r600_common_context *rctx,