gallium: add access field to pipe_image_view

This allows drivers to make smarter decisions e.g. about whether the image
has to be decompressed.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
Nicolai Hähnle
2016-03-11 20:04:19 -05:00
parent 8c497b8fb5
commit 71a1b54b33
2 changed files with 10 additions and 1 deletions
+8
View File
@@ -540,6 +540,14 @@ enum pipe_reset_status
#define PIPE_HANDLE_USAGE_READ_WRITE (PIPE_HANDLE_USAGE_READ | \
PIPE_HANDLE_USAGE_WRITE)
/**
* pipe_image_view access flags.
*/
#define PIPE_IMAGE_ACCESS_READ (1 << 0)
#define PIPE_IMAGE_ACCESS_WRITE (1 << 1)
#define PIPE_IMAGE_ACCESS_READ_WRITE (PIPE_IMAGE_ACCESS_READ | \
PIPE_IMAGE_ACCESS_WRITE)
/**
* Implementation capabilities/limits which are queried through
* pipe_screen::get_param()
+2 -1
View File
@@ -393,13 +393,14 @@ struct pipe_sampler_view
/**
* A description of a writable buffer or texture that can be bound to a shader
* A description of a buffer or texture image that can be bound to a shader
* stage.
*/
struct pipe_image_view
{
struct pipe_resource *resource; /**< resource into which this is a view */
enum pipe_format format; /**< typed PIPE_FORMAT_x */
unsigned access; /**< PIPE_IMAGE_ACCESS_x */
union {
struct {