Skip to content

Commit

Permalink
Vulkan: Fix redefining TexStorage after TexImage.
Browse files Browse the repository at this point in the history
This can be easily implemented via a release call.

Bug: angleproject:2651
Change-Id: I0adb3ed385284c6342716cd7c347de9966a81bab
Reviewed-on: https://chromium-review.googlesource.com/1200368
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
  • Loading branch information
null77 authored and Commit Bot committed Sep 3, 2018
1 parent a792193 commit 3e29cf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/libANGLE/renderer/vulkan/TextureVk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,12 @@ gl::Error TextureVk::setStorage(const gl::Context *context,
const vk::Format &format = renderer->getFormat(internalFormat);
vk::CommandBuffer *commandBuffer = nullptr;
ANGLE_TRY(getCommandBufferForWrite(contextVk, &commandBuffer));

if (mImage.valid())
{
releaseImage(context, renderer);
}

ANGLE_TRY(initImage(contextVk, format, size, static_cast<uint32_t>(levels), commandBuffer));
return gl::NoError();
}
Expand Down
4 changes: 0 additions & 4 deletions src/tests/gl_tests/StateChangeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,6 @@ TEST_P(StateChangeTest, FramebufferIncompleteWithTexStorage)
{
ANGLE_SKIP_TEST_IF(!extensionEnabled("GL_EXT_texture_storage"));

// TODO(lucferron): Diagnose and fix
// http://anglebug.com/2651
ANGLE_SKIP_TEST_IF(IsVulkan());

glBindFramebuffer(GL_FRAMEBUFFER, mFramebuffer);
glBindTexture(GL_TEXTURE_2D, mTextures[0]);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 16, 16, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
Expand Down

0 comments on commit 3e29cf3

Please sign in to comment.