summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-03-29 16:29:24 +0200
committerSamuel Pitoiset <[email protected]>2017-06-14 10:04:36 +0200
commit41257fddc8843e800e3f1c61ccf1862cf81d3333 (patch)
tree11f8ce48acf66c39ae1dc7faa33a288d48d8e35f /src
parent028a9b54c49ee8bf70ef54f2c9dd58ee660291ec (diff)
mesa: refuse to change tex buffers when a handle is allocated
The ARB_bindless_texture spec says: "The error INVALID_OPERATION is generated by BufferData if it is called to modify a buffer object bound to a buffer texture while that texture object is referenced by one or more texture handles." Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/bufferobj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index e66a3a56688..bb2f0d9d9d4 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1562,7 +1562,7 @@ validate_buffer_storage(struct gl_context *ctx,
return false;
}
- if (bufObj->Immutable) {
+ if (bufObj->Immutable || bufObj->HandleAllocated) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(immutable)", func);
return false;
}
@@ -1726,7 +1726,7 @@ _mesa_buffer_data(struct gl_context *ctx, struct gl_buffer_object *bufObj,
return;
}
- if (bufObj->Immutable) {
+ if (bufObj->Immutable || bufObj->HandleAllocated) {
_mesa_error(ctx, GL_INVALID_OPERATION, "%s(immutable)", func);
return;
}