st/mesa: Fix EGLImageTargetTexture2D for GL_TEXTURE_2D
Before this change, internalFormat was defaulted to GL_RGBA ( unsized internal format). Therefore, subsequent glTexSubImage2D call with type != GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_4_4_4_4 or GL_UNSIGNED_SHORT_5_5_5_1 would give GL_INVALID_OPERATION. This fixes android.graphics.cts.BitmapColorSpaceTest#test16bitHardware android.graphics.cts.ImageDecoderTest#testDecodeBitmap* android.graphics.cts.BitmapTest#testNdkFormatsHardware in CtsGraphicsTestCases Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6382>
This commit is contained in:
parent
855afe0144
commit
5e4d69ec78
|
@ -327,7 +327,9 @@ st_egl_image_target_texture_2d(struct gl_context *ctx, GLenum target,
|
|||
&native_supported))
|
||||
return;
|
||||
|
||||
st_bind_egl_image(ctx, texObj, texImage, &stimg, false, native_supported);
|
||||
st_bind_egl_image(ctx, texObj, texImage, &stimg,
|
||||
target != GL_TEXTURE_EXTERNAL_OES,
|
||||
native_supported);
|
||||
pipe_resource_reference(&stimg.texture, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue