summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_resource_buffer.c4
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_buffer.c b/src/gallium/drivers/svga/svga_resource_buffer.c
index fa713ee88ad..57ec752bf9b 100644
--- a/src/gallium/drivers/svga/svga_resource_buffer.c
+++ b/src/gallium/drivers/svga/svga_resource_buffer.c
@@ -74,6 +74,10 @@ svga_buffer_get_transfer(struct pipe_context *pipe,
struct svga_buffer *sbuf = svga_buffer(resource);
struct pipe_transfer *transfer;
+ if (usage & PIPE_TRANSFER_MAP_PERMANENTLY) {
+ return NULL;
+ }
+
transfer = CALLOC_STRUCT(pipe_transfer);
if (transfer == NULL) {
return NULL;
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index 697c1d3c5e3..4eb1068e226 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -259,7 +259,7 @@ svga_texture_get_transfer(struct pipe_context *pipe,
unsigned nblocksy = util_format_get_nblocksy(texture->format, box->height);
/* We can't map texture storage directly */
- if (usage & PIPE_TRANSFER_MAP_DIRECTLY)
+ if (usage & (PIPE_TRANSFER_MAP_DIRECTLY | PIPE_TRANSFER_MAP_PERMANENTLY))
return NULL;
assert(box->depth == 1);