diff options
Diffstat (limited to 'src/mesa/main/externalobjects.c')
-rw-r--r-- | src/mesa/main/externalobjects.c | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/src/mesa/main/externalobjects.c b/src/mesa/main/externalobjects.c index 3843c9492e9..098a0999208 100644 --- a/src/mesa/main/externalobjects.c +++ b/src/mesa/main/externalobjects.c @@ -285,9 +285,24 @@ static void texstorage_memory_ms(GLuint dims, GLenum target, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, - GLuint memory, GLuint64 offset) + GLuint memory, GLuint64 offset, const char* func) { + struct gl_texture_object *texObj; + struct gl_memory_object *memObj; + + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_get_current_tex_object(ctx, target); + if (!texObj) + return; + + memObj = lookup_memory_object_err(ctx, memory, func); + if (!memObj) + return; + _mesa_texture_storage_ms_memory(ctx, dims, texObj, memObj, target, samples, + internalFormat, width, height, depth, + fixedSampleLocations, offset, func); } /** @@ -321,9 +336,24 @@ static void texturestorage_memory_ms(GLuint dims, GLuint texture, GLsizei samples, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations, - GLuint memory, GLuint64 offset) + GLuint memory, GLuint64 offset, const char* func) { + struct gl_texture_object *texObj; + struct gl_memory_object *memObj; + + GET_CURRENT_CONTEXT(ctx); + + texObj = _mesa_lookup_texture(ctx, texture); + if (!texObj) + return; + + memObj = lookup_memory_object_err(ctx, memory, func); + if (!memObj) + return; + _mesa_texture_storage_ms_memory(ctx, dims, texObj, memObj, texObj->Target, + samples, internalFormat, width, height, + depth, fixedSampleLocations, offset, func); } void GLAPIENTRY @@ -350,7 +380,8 @@ _mesa_TexStorageMem2DMultisampleEXT(GLenum target, GLuint64 offset) { texstorage_memory_ms(2, target, samples, internalFormat, width, height, 1, - fixedSampleLocations, memory, offset); + fixedSampleLocations, memory, offset, + "glTexStorageMem2DMultisampleEXT"); } void GLAPIENTRY @@ -379,7 +410,8 @@ _mesa_TexStorageMem3DMultisampleEXT(GLenum target, GLuint64 offset) { texstorage_memory_ms(3, target, samples, internalFormat, width, height, - depth, fixedSampleLocations, memory, offset); + depth, fixedSampleLocations, memory, offset, + "glTexStorageMem3DMultisampleEXT"); } void GLAPIENTRY @@ -406,7 +438,8 @@ _mesa_TextureStorageMem2DMultisampleEXT(GLuint texture, GLuint64 offset) { texturestorage_memory_ms(2, texture, samples, internalFormat, width, height, - 1, fixedSampleLocations, memory, offset); + 1, fixedSampleLocations, memory, offset, + "glTextureStorageMem2DMultisampleEXT"); } void GLAPIENTRY @@ -435,7 +468,8 @@ _mesa_TextureStorageMem3DMultisampleEXT(GLuint texture, GLuint64 offset) { texturestorage_memory_ms(3, texture, samples, internalFormat, width, height, - depth, fixedSampleLocations, memory, offset); + depth, fixedSampleLocations, memory, offset, + "glTextureStorageMem3DMultisampleEXT"); } void GLAPIENTRY |