Commit af58be7e by Ian Elliott Committed by Commit Bot

Add TextureType::Buffer to RecordBindTextureTypeError()

Bug: b/184767884 Change-Id: I67098de503748c86f2b957db76539e73c87bd179 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818818Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
parent 147adcfa
...@@ -6147,6 +6147,12 @@ void RecordBindTextureTypeError(const Context *context, TextureType target) ...@@ -6147,6 +6147,12 @@ void RecordBindTextureTypeError(const Context *context, TextureType target)
context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled); context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled);
break; break;
case TextureType::Buffer:
ASSERT(!context->getExtensions().textureBufferOES &&
!context->getExtensions().textureBufferEXT);
context->validationError(GL_INVALID_ENUM, kExtensionNotEnabled);
break;
default: default:
context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget); context->validationError(GL_INVALID_ENUM, kInvalidTextureTarget);
} }
......
...@@ -9013,6 +9013,16 @@ void main() ...@@ -9013,6 +9013,16 @@ void main()
EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::cyan); EXPECT_PIXEL_COLOR_EQ(0, 0, GLColor::cyan);
} }
// Test that the correct error is generated if texture buffer support used anyway when not enabled.
TEST_P(TextureBufferTestES31, TestErrorWhenNotEnabled)
{
ANGLE_SKIP_TEST_IF(IsGLExtensionEnabled("GL_EXT_texture_buffer"));
GLTexture texture;
glBindTexture(GL_TEXTURE_BUFFER, texture);
ASSERT_GL_ERROR(GL_INVALID_ENUM);
}
class CopyImageTestES31 : public ANGLETest class CopyImageTestES31 : public ANGLETest
{ {
protected: protected:
......
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