mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
st/mesa: set image access flags in st_bind_images
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
71a1b54b33
commit
f6dc4f5558
1 changed files with 15 additions and 0 deletions
|
|
@ -70,6 +70,21 @@ st_bind_images(struct st_context *st, struct gl_shader *shader,
|
|||
|
||||
img->resource = stObj->pt;
|
||||
img->format = st_mesa_format_to_pipe_format(st, u->_ActualFormat);
|
||||
|
||||
switch (u->Access) {
|
||||
case GL_READ_ONLY:
|
||||
img->access = PIPE_IMAGE_ACCESS_READ;
|
||||
break;
|
||||
case GL_WRITE_ONLY:
|
||||
img->access = PIPE_IMAGE_ACCESS_WRITE;
|
||||
break;
|
||||
case GL_READ_WRITE:
|
||||
img->access = PIPE_IMAGE_ACCESS_READ_WRITE;
|
||||
break;
|
||||
default:
|
||||
unreachable("bad gl_image_unit::Access");
|
||||
}
|
||||
|
||||
if (stObj->pt->target == PIPE_BUFFER) {
|
||||
unsigned base, size;
|
||||
unsigned f, n;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue