Commit 9b050471 authored by Anthony Pesch's avatar Anthony Pesch Committed by Juan Suárez Romero

arb_get_texture_sub_image: fix depth parameter when performing zero-sized texture queries

Change zero-sized texture queries to pass a valid depth parameter, otherwise
they should error as per the OpenGL 4.6 Core spec:

"An INVALID_VALUE error is generated if the effective target is TEXTURE_1D,
TEXTURE_1D_ARRAY, TEXTURE_2D or TEXTURE_RECTANGLE, and either zoffset is not
zero, or depth is not one."
Reviewed-by: default avatarArthur Huillet <ahuillet@nvidia.com>
Reviewed-by: Juan Suárez Romero's avatarJuan A. Suarez <jasuarez@igalia.com>
parent f2a0ebb4
......@@ -293,7 +293,7 @@ test_zero_size_image(void)
/* getting 0x0 image from 8x8 source should work */
glGetTextureSubImage(tex, 0,
0, 0, 0,
0, 0, 0,
0, 0, 1,
GL_RGBA, GL_UNSIGNED_BYTE,
sizeof(image), image);
if (!piglit_check_gl_error(GL_NO_ERROR))
......@@ -306,7 +306,7 @@ test_zero_size_image(void)
/* getting 0x0 image from 0x0 source should work */
glGetTextureSubImage(tex, 0,
0, 0, 0,
0, 0, 0,
0, 0, 1,
GL_RGBA, GL_UNSIGNED_BYTE,
sizeof(image), image);
if (!piglit_check_gl_error(GL_NO_ERROR))
......@@ -315,7 +315,7 @@ test_zero_size_image(void)
/* getting 0x0 image at an offset from 0x0 source should error */
glGetTextureSubImage(tex, 0,
1, 2, 0, /* offset */
0, 0, 0,
0, 0, 1,
GL_RGBA, GL_UNSIGNED_BYTE,
sizeof(image), image);
if (!piglit_check_gl_error(GL_INVALID_VALUE))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment