瀏覽代碼

mesa: allow mutable buffer textures to back GL ES images

Since there is no way to create immutable texture buffers in GL ES,
mutable buffer textures are allowed to back images. See issue 7 of the
GL_OES_texture_buffer specification.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
tags/12.0-branchpoint
Ilia Mirkin 9 年之前
父節點
當前提交
553e37aa33
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. 6
    1
      src/mesa/main/shaderimage.c

+ 6
- 1
src/mesa/main/shaderimage.c 查看文件

@@ -583,8 +583,13 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
*
* "An INVALID_OPERATION error is generated if texture is not the name
* of an immutable texture object."
*
* However note that issue 7 of the GL_OES_texture_buffer spec
* recognizes that there is no way to create immutable buffer textures,
* so those are excluded from this requirement.
*/
if (_mesa_is_gles(ctx) && !t->Immutable) {
if (_mesa_is_gles(ctx) && !t->Immutable &&
t->Target != GL_TEXTURE_BUFFER) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindImageTexture(!immutable)");
return;

Loading…
取消
儲存