2 * Mesa 3-D graphics library
4 * Copyright (C) 2011 VMware, Inc. All Rights Reserved.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
27 * GL_ARB_texture_storage functions
33 #include "util/imports.h"
38 #include "texstorage.h"
39 #include "textureview.h"
41 #include "glformats.h"
46 * Check if the given texture target is a legal texture object target
47 * for a glTexStorage() command.
48 * This is a bit different than legal_teximage_target() when it comes
52 legal_texobj_target(const struct gl_context
*ctx
, GLuint dims
, GLenum target
)
54 if (dims
< 1 || dims
> 3) {
55 _mesa_problem(ctx
, "invalid dims=%u in legal_texobj_target()", dims
);
64 case GL_TEXTURE_CUBE_MAP
:
65 return ctx
->Extensions
.ARB_texture_cube_map
;
72 case GL_TEXTURE_2D_ARRAY
:
73 return ctx
->Extensions
.EXT_texture_array
;
74 case GL_TEXTURE_CUBE_MAP_ARRAY
:
75 return _mesa_has_texture_cube_map_array(ctx
);
80 if (!_mesa_is_desktop_gl(ctx
))
87 case GL_PROXY_TEXTURE_1D
:
94 case GL_PROXY_TEXTURE_2D
:
96 case GL_PROXY_TEXTURE_CUBE_MAP
:
97 return ctx
->Extensions
.ARB_texture_cube_map
;
98 case GL_TEXTURE_RECTANGLE
:
99 case GL_PROXY_TEXTURE_RECTANGLE
:
100 return ctx
->Extensions
.NV_texture_rectangle
;
101 case GL_TEXTURE_1D_ARRAY
:
102 case GL_PROXY_TEXTURE_1D_ARRAY
:
103 return ctx
->Extensions
.EXT_texture_array
;
109 case GL_PROXY_TEXTURE_3D
:
111 case GL_PROXY_TEXTURE_2D_ARRAY
:
112 return ctx
->Extensions
.EXT_texture_array
;
113 case GL_PROXY_TEXTURE_CUBE_MAP_ARRAY
:
114 return ctx
->Extensions
.ARB_texture_cube_map_array
;
119 unreachable("impossible dimensions");
124 /** Helper to get a particular texture image in a texture object */
125 static struct gl_texture_image
*
126 get_tex_image(struct gl_context
*ctx
,
127 struct gl_texture_object
*texObj
,
128 GLuint face
, GLuint level
)
130 const GLenum faceTarget
=
131 (texObj
->Target
== GL_TEXTURE_CUBE_MAP
||
132 texObj
->Target
== GL_PROXY_TEXTURE_CUBE_MAP
)
133 ? GL_TEXTURE_CUBE_MAP_POSITIVE_X
+ face
: texObj
->Target
;
134 return _mesa_get_tex_image(ctx
, texObj
, faceTarget
, level
);
140 initialize_texture_fields(struct gl_context
*ctx
,
141 struct gl_texture_object
*texObj
,
143 GLsizei width
, GLsizei height
, GLsizei depth
,
144 GLenum internalFormat
, mesa_format texFormat
)
146 const GLenum target
= texObj
->Target
;
147 const GLuint numFaces
= _mesa_num_tex_faces(target
);
148 GLint level
, levelWidth
= width
, levelHeight
= height
, levelDepth
= depth
;
151 /* Set up all the texture object's gl_texture_images */
152 for (level
= 0; level
< levels
; level
++) {
153 for (face
= 0; face
< numFaces
; face
++) {
154 struct gl_texture_image
*texImage
=
155 get_tex_image(ctx
, texObj
, face
, level
);
158 _mesa_error(ctx
, GL_OUT_OF_MEMORY
, "glTexStorage");
162 _mesa_init_teximage_fields(ctx
, texImage
,
163 levelWidth
, levelHeight
, levelDepth
,
164 0, internalFormat
, texFormat
);
167 _mesa_next_mipmap_level_size(target
, 0,
168 levelWidth
, levelHeight
, levelDepth
,
169 &levelWidth
, &levelHeight
, &levelDepth
);
176 * Clear all fields of texture object to zeros. Used for proxy texture tests
177 * and to clean up when a texture memory allocation fails.
180 clear_texture_fields(struct gl_context
*ctx
,
181 struct gl_texture_object
*texObj
)
183 const GLenum target
= texObj
->Target
;
184 const GLuint numFaces
= _mesa_num_tex_faces(target
);
188 for (level
= 0; level
< ARRAY_SIZE(texObj
->Image
[0]); level
++) {
189 for (face
= 0; face
< numFaces
; face
++) {
190 struct gl_texture_image
*texImage
=
191 get_tex_image(ctx
, texObj
, face
, level
);
194 _mesa_error(ctx
, GL_OUT_OF_MEMORY
, "glTexStorage");
198 _mesa_clear_texture_image(ctx
, texImage
);
205 * Update/re-validate framebuffer object.
208 update_fbo_texture(struct gl_context
*ctx
, struct gl_texture_object
*texObj
)
210 const unsigned numFaces
= _mesa_num_tex_faces(texObj
->Target
);
211 for (int level
= 0; level
< ARRAY_SIZE(texObj
->Image
[0]); level
++) {
212 for (unsigned face
= 0; face
< numFaces
; face
++)
213 _mesa_update_fbo_texture(ctx
, texObj
, face
, level
);
219 _mesa_is_legal_tex_storage_format(const struct gl_context
*ctx
,
220 GLenum internalformat
)
222 /* check internal format - note that only sized formats are allowed */
223 switch (internalformat
) {
226 case GL_LUMINANCE_ALPHA
:
233 case GL_DEPTH_COMPONENT
:
234 case GL_DEPTH_STENCIL
:
235 case GL_COMPRESSED_ALPHA
:
236 case GL_COMPRESSED_LUMINANCE_ALPHA
:
237 case GL_COMPRESSED_LUMINANCE
:
238 case GL_COMPRESSED_INTENSITY
:
239 case GL_COMPRESSED_RGB
:
240 case GL_COMPRESSED_RGBA
:
241 case GL_COMPRESSED_SRGB
:
242 case GL_COMPRESSED_SRGB_ALPHA
:
243 case GL_COMPRESSED_SLUMINANCE
:
244 case GL_COMPRESSED_SLUMINANCE_ALPHA
:
246 case GL_GREEN_INTEGER
:
247 case GL_BLUE_INTEGER
:
248 case GL_ALPHA_INTEGER
:
250 case GL_RGBA_INTEGER
:
252 case GL_BGRA_INTEGER
:
253 case GL_LUMINANCE_INTEGER_EXT
:
254 case GL_LUMINANCE_ALPHA_INTEGER_EXT
:
255 /* these unsized formats are illegal */
258 return _mesa_base_tex_format(ctx
, internalformat
) > 0;
264 * Default ctx->Driver.AllocTextureStorage() handler.
266 * The driver can override this with a more specific implementation if it
267 * desires, but this can be used to get the texture images allocated using the
268 * usual texture image handling code. The immutability of
269 * GL_ARB_texture_storage texture layouts is handled by texObj->Immutable
270 * checks at glTexImage* time.
273 _mesa_AllocTextureStorage_sw(struct gl_context
*ctx
,
274 struct gl_texture_object
*texObj
,
275 GLsizei levels
, GLsizei width
,
276 GLsizei height
, GLsizei depth
)
278 const int numFaces
= _mesa_num_tex_faces(texObj
->Target
);
286 for (face
= 0; face
< numFaces
; face
++) {
287 for (level
= 0; level
< levels
; level
++) {
288 struct gl_texture_image
*const texImage
= texObj
->Image
[face
][level
];
289 if (!ctx
->Driver
.AllocTextureImageBuffer(ctx
, texImage
))
299 * Do error checking for calls to glTexStorage1/2/3D().
300 * If an error is found, record it with _mesa_error(), unless the target
301 * is a proxy texture.
302 * \return GL_TRUE if any error, GL_FALSE otherwise.
305 tex_storage_error_check(struct gl_context
*ctx
,
306 struct gl_texture_object
*texObj
,
307 struct gl_memory_object
*memObj
,
308 GLuint dims
, GLenum target
,
309 GLsizei levels
, GLenum internalformat
,
310 GLsizei width
, GLsizei height
, GLsizei depth
,
313 const char* suffix
= dsa
? (memObj
? "tureMem" : "ture") :
314 (memObj
? "Mem" : "");
316 /* Legal format checking has been moved to texstorage and texturestorage in
317 * order to allow meta functions to use legacy formats. */
320 if (!_mesa_valid_tex_storage_dim(width
, height
, depth
)) {
321 _mesa_error(ctx
, GL_INVALID_VALUE
,
322 "glTex%sStorage%uD(width, height or depth < 1)",
327 if (_mesa_is_compressed_format(ctx
, internalformat
)) {
329 if (!_mesa_target_can_be_compressed(ctx
, target
, internalformat
, &err
)) {
330 _mesa_error(ctx
, err
,
331 "glTex%sStorage%dD(internalformat = %s)", suffix
, dims
,
332 _mesa_enum_to_string(internalformat
));
339 _mesa_error(ctx
, GL_INVALID_VALUE
, "glTex%sStorage%uD(levels < 1)",
344 /* check levels against maximum (note different error than above) */
345 if (levels
> (GLint
) _mesa_max_texture_levels(ctx
, target
)) {
346 _mesa_error(ctx
, GL_INVALID_OPERATION
,
347 "glTex%sStorage%uD(levels too large)",
352 /* check levels against width/height/depth */
353 if (levels
> _mesa_get_tex_max_num_levels(target
, width
, height
, depth
)) {
354 _mesa_error(ctx
, GL_INVALID_OPERATION
,
355 "glTex%sStorage%uD(too many levels"
356 " for max texture dimension)",
361 /* non-default texture object check */
362 if (!_mesa_is_proxy_texture(target
) && (!texObj
|| (texObj
->Name
== 0))) {
363 _mesa_error(ctx
, GL_INVALID_OPERATION
,
364 "glTex%sStorage%uD(texture object 0)",
369 /* Check if texObj->Immutable is set */
370 if (!_mesa_is_proxy_texture(target
) && texObj
->Immutable
) {
371 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glTex%sStorage%uD(immutable)",
376 /* additional checks for depth textures */
377 if (!_mesa_legal_texture_base_format_for_target(ctx
, target
, internalformat
)) {
378 _mesa_error(ctx
, GL_INVALID_OPERATION
, "glTex%sStorage%uD(bad target for texture)",
388 * Helper that does the storage allocation for _mesa_TexStorage1/2/3D()
389 * and _mesa_TextureStorage1/2/3D().
391 static ALWAYS_INLINE
void
392 texture_storage(struct gl_context
*ctx
, GLuint dims
,
393 struct gl_texture_object
*texObj
,
394 struct gl_memory_object
*memObj
, GLenum target
,
395 GLsizei levels
, GLenum internalformat
, GLsizei width
,
396 GLsizei height
, GLsizei depth
, GLuint64 offset
, bool dsa
,
399 GLboolean sizeOK
= GL_TRUE
, dimensionsOK
= GL_TRUE
;
400 mesa_format texFormat
;
401 const char* suffix
= dsa
? (memObj
? "tureMem" : "ture") :
402 (memObj
? "Mem" : "");
407 if (tex_storage_error_check(ctx
, texObj
, memObj
, dims
, target
, levels
,
408 internalformat
, width
, height
, depth
, dsa
)) {
409 return; /* error was recorded */
413 texFormat
= _mesa_choose_texture_format(ctx
, texObj
, target
, 0,
414 internalformat
, GL_NONE
, GL_NONE
);
417 /* check that width, height, depth are legal for the mipmap level */
418 dimensionsOK
= _mesa_legal_texture_dimensions(ctx
, target
, 0,
419 width
, height
, depth
, 0);
421 sizeOK
= ctx
->Driver
.TestProxyTexImage(ctx
, target
, levels
, 0, texFormat
,
422 1, width
, height
, depth
);
425 if (_mesa_is_proxy_texture(target
)) {
426 if (dimensionsOK
&& sizeOK
) {
427 initialize_texture_fields(ctx
, texObj
, levels
, width
, height
, depth
,
428 internalformat
, texFormat
);
431 /* clear all image fields for [levels] */
432 clear_texture_fields(ctx
, texObj
);
438 _mesa_error(ctx
, GL_INVALID_VALUE
,
439 "glTex%sStorage%uD(invalid width, height or depth)",
445 _mesa_error(ctx
, GL_OUT_OF_MEMORY
,
446 "glTex%sStorage%uD(texture too large)",
457 if (!initialize_texture_fields(ctx
, texObj
, levels
, width
, height
, depth
,
458 internalformat
, texFormat
)) {
462 /* Setup the backing memory */
464 if (!ctx
->Driver
.SetTextureStorageForMemoryObject(ctx
, texObj
, memObj
,
466 width
, height
, depth
,
469 clear_texture_fields(ctx
, texObj
);
474 if (!ctx
->Driver
.AllocTextureStorage(ctx
, texObj
, levels
,
475 width
, height
, depth
)) {
476 /* Reset the texture images' info to zeros.
477 * Strictly speaking, we probably don't have to do this since
478 * generating GL_OUT_OF_MEMORY can leave things in an undefined
479 * state but this puts things in a consistent state.
481 clear_texture_fields(ctx
, texObj
);
482 _mesa_error(ctx
, GL_OUT_OF_MEMORY
, "glTex%sStorage%uD",
488 _mesa_set_texture_view_state(ctx
, texObj
, target
, levels
);
490 update_fbo_texture(ctx
, texObj
);
496 texture_storage_error(struct gl_context
*ctx
, GLuint dims
,
497 struct gl_texture_object
*texObj
,
498 GLenum target
, GLsizei levels
,
499 GLenum internalformat
, GLsizei width
,
500 GLsizei height
, GLsizei depth
, bool dsa
)
502 texture_storage(ctx
, dims
, texObj
, NULL
, target
, levels
, internalformat
,
503 width
, height
, depth
, dsa
, 0, false);
508 texture_storage_no_error(struct gl_context
*ctx
, GLuint dims
,
509 struct gl_texture_object
*texObj
,
510 GLenum target
, GLsizei levels
,
511 GLenum internalformat
, GLsizei width
,
512 GLsizei height
, GLsizei depth
, bool dsa
)
514 texture_storage(ctx
, dims
, texObj
, NULL
, target
, levels
, internalformat
,
515 width
, height
, depth
, dsa
, 0, true);
520 * Helper used by _mesa_TexStorage1/2/3D().
523 texstorage_error(GLuint dims
, GLenum target
, GLsizei levels
,
524 GLenum internalformat
, GLsizei width
, GLsizei height
,
525 GLsizei depth
, const char *caller
)
527 struct gl_texture_object
*texObj
;
528 GET_CURRENT_CONTEXT(ctx
);
530 /* Check target. This is done here so that texture_storage
531 * can receive unsized formats.
533 if (!legal_texobj_target(ctx
, dims
, target
)) {
534 _mesa_error(ctx
, GL_INVALID_ENUM
,
535 "%s(illegal target=%s)",
536 caller
, _mesa_enum_to_string(target
));
540 if (MESA_VERBOSE
& (VERBOSE_API
|VERBOSE_TEXTURE
))
541 _mesa_debug(ctx
, "%s %s %d %s %d %d %d\n", caller
,
542 _mesa_enum_to_string(target
), levels
,
543 _mesa_enum_to_string(internalformat
),
544 width
, height
, depth
);
546 /* Check the format to make sure it is sized. */
547 if (!_mesa_is_legal_tex_storage_format(ctx
, internalformat
)) {
548 _mesa_error(ctx
, GL_INVALID_ENUM
,
549 "%s(internalformat = %s)", caller
,
550 _mesa_enum_to_string(internalformat
));
554 texObj
= _mesa_get_current_tex_object(ctx
, target
);
558 texture_storage_error(ctx
, dims
, texObj
, target
, levels
,
559 internalformat
, width
, height
, depth
, false);
564 texstorage_no_error(GLuint dims
, GLenum target
, GLsizei levels
,
565 GLenum internalformat
, GLsizei width
, GLsizei height
,
568 GET_CURRENT_CONTEXT(ctx
);
570 struct gl_texture_object
*texObj
= _mesa_get_current_tex_object(ctx
, target
);
571 texture_storage_no_error(ctx
, dims
, texObj
, target
, levels
,
572 internalformat
, width
, height
, depth
, false);
577 * Helper used by _mesa_TextureStorage1/2/3D().
580 texturestorage_error(GLuint dims
, GLuint texture
, GLsizei levels
,
581 GLenum internalformat
, GLsizei width
, GLsizei height
,
582 GLsizei depth
, const char *caller
)
584 struct gl_texture_object
*texObj
;
585 GET_CURRENT_CONTEXT(ctx
);
587 if (MESA_VERBOSE
& (VERBOSE_API
|VERBOSE_TEXTURE
))
588 _mesa_debug(ctx
, "%s %d %d %s %d %d %d\n",
589 caller
, texture
, levels
,
590 _mesa_enum_to_string(internalformat
),
591 width
, height
, depth
);
593 /* Check the format to make sure it is sized. */
594 if (!_mesa_is_legal_tex_storage_format(ctx
, internalformat
)) {
595 _mesa_error(ctx
, GL_INVALID_ENUM
,
596 "%s(internalformat = %s)", caller
,
597 _mesa_enum_to_string(internalformat
));
601 texObj
= _mesa_lookup_texture_err(ctx
, texture
, caller
);
605 /* Check target. This is done here so that texture_storage
606 * can receive unsized formats.
608 if (!legal_texobj_target(ctx
, dims
, texObj
->Target
)) {
609 _mesa_error(ctx
, GL_INVALID_OPERATION
,
610 "%s(illegal target=%s)", caller
,
611 _mesa_enum_to_string(texObj
->Target
));
615 texture_storage_error(ctx
, dims
, texObj
, texObj
->Target
,
616 levels
, internalformat
, width
, height
, depth
, true);
621 texturestorage_no_error(GLuint dims
, GLuint texture
, GLsizei levels
,
622 GLenum internalformat
, GLsizei width
, GLsizei height
,
625 GET_CURRENT_CONTEXT(ctx
);
627 struct gl_texture_object
*texObj
= _mesa_lookup_texture(ctx
, texture
);
628 texture_storage_no_error(ctx
, dims
, texObj
, texObj
->Target
,
629 levels
, internalformat
, width
, height
, depth
, true);
634 _mesa_TexStorage1D_no_error(GLenum target
, GLsizei levels
,
635 GLenum internalformat
, GLsizei width
)
637 texstorage_no_error(1, target
, levels
, internalformat
, width
, 1, 1);
642 _mesa_TexStorage1D(GLenum target
, GLsizei levels
, GLenum internalformat
,
645 texstorage_error(1, target
, levels
, internalformat
, width
, 1, 1,
651 _mesa_TexStorage2D_no_error(GLenum target
, GLsizei levels
,
652 GLenum internalformat
, GLsizei width
,
655 texstorage_no_error(2, target
, levels
, internalformat
, width
, height
, 1);
660 _mesa_TexStorage2D(GLenum target
, GLsizei levels
, GLenum internalformat
,
661 GLsizei width
, GLsizei height
)
663 texstorage_error(2, target
, levels
, internalformat
, width
, height
, 1,
669 _mesa_TexStorage3D_no_error(GLenum target
, GLsizei levels
,
670 GLenum internalformat
, GLsizei width
,
671 GLsizei height
, GLsizei depth
)
673 texstorage_no_error(3, target
, levels
, internalformat
, width
, height
, depth
);
678 _mesa_TexStorage3D(GLenum target
, GLsizei levels
, GLenum internalformat
,
679 GLsizei width
, GLsizei height
, GLsizei depth
)
681 texstorage_error(3, target
, levels
, internalformat
, width
, height
, depth
,
687 _mesa_TextureStorage1D_no_error(GLuint texture
, GLsizei levels
,
688 GLenum internalformat
, GLsizei width
)
690 texturestorage_no_error(1, texture
, levels
, internalformat
, width
, 1, 1);
695 _mesa_TextureStorage1D(GLuint texture
, GLsizei levels
, GLenum internalformat
,
698 texturestorage_error(1, texture
, levels
, internalformat
, width
, 1, 1,
699 "glTextureStorage1D");
704 _mesa_TextureStorage2D_no_error(GLuint texture
, GLsizei levels
,
705 GLenum internalformat
,
706 GLsizei width
, GLsizei height
)
708 texturestorage_no_error(2, texture
, levels
, internalformat
, width
, height
, 1);
713 _mesa_TextureStorage2D(GLuint texture
, GLsizei levels
,
714 GLenum internalformat
,
715 GLsizei width
, GLsizei height
)
717 texturestorage_error(2, texture
, levels
, internalformat
, width
, height
, 1,
718 "glTextureStorage2D");
723 _mesa_TextureStorage3D_no_error(GLuint texture
, GLsizei levels
,
724 GLenum internalformat
, GLsizei width
,
725 GLsizei height
, GLsizei depth
)
727 texturestorage_no_error(3, texture
, levels
, internalformat
, width
, height
,
733 _mesa_TextureStorage3D(GLuint texture
, GLsizei levels
, GLenum internalformat
,
734 GLsizei width
, GLsizei height
, GLsizei depth
)
736 texturestorage_error(3, texture
, levels
, internalformat
, width
, height
, depth
,
737 "glTextureStorage3D");
742 _mesa_TextureStorage1DEXT(GLuint texture
, GLenum target
, GLsizei levels
,
743 GLenum internalformat
,
746 GET_CURRENT_CONTEXT(ctx
);
747 /* 'texture' must always be initialized, even if the call to
748 * glTextureStorage1DEXT will generate an error.
750 if (!_mesa_lookup_or_create_texture(ctx
, target
, texture
, false, true,
751 "glTextureStorage1DEXT"))
753 texturestorage_error(1, texture
, levels
, internalformat
, width
, 1, 1,
754 "glTextureStorage1DEXT");
759 _mesa_TextureStorage2DEXT(GLuint texture
, GLenum target
, GLsizei levels
,
760 GLenum internalformat
,
761 GLsizei width
, GLsizei height
)
763 GET_CURRENT_CONTEXT(ctx
);
764 /* 'texture' must always be initialized, even if the call to
765 * glTextureStorage2DEXT will generate an error.
767 if (!_mesa_lookup_or_create_texture(ctx
, target
, texture
, false, true,
768 "glTextureStorage2DEXT"))
770 texturestorage_error(2, texture
, levels
, internalformat
, width
, height
, 1,
771 "glTextureStorage2DEXT");
776 _mesa_TextureStorage3DEXT(GLuint texture
, GLenum target
, GLsizei levels
,
777 GLenum internalformat
,
778 GLsizei width
, GLsizei height
, GLsizei depth
)
780 GET_CURRENT_CONTEXT(ctx
);
781 /* 'texture' must always be initialized, even if the call to
782 * glTextureStorage3DEXT will generate an error.
784 if (!_mesa_lookup_or_create_texture(ctx
, target
, texture
, false, true,
785 "glTextureStorage3DEXT"))
787 texturestorage_error(3, texture
, levels
, internalformat
, width
, height
, depth
,
788 "glTextureStorage3DEXT");
793 _mesa_texture_storage_memory(struct gl_context
*ctx
, GLuint dims
,
794 struct gl_texture_object
*texObj
,
795 struct gl_memory_object
*memObj
,
796 GLenum target
, GLsizei levels
,
797 GLenum internalformat
, GLsizei width
,
798 GLsizei height
, GLsizei depth
,
799 GLuint64 offset
, bool dsa
)
803 texture_storage(ctx
, dims
, texObj
, memObj
, target
, levels
, internalformat
,
804 width
, height
, depth
, offset
, dsa
, false);