Commit a25c15c5 by Cody Northrop Committed by Commit Bot

Implement FramebufferTexture3D

Bug: angleproject:3188 Bug: angleproject:3797 Test: KHR-GLES2.texture_3d.framebuffer_texture.rgba8 (with patch from 3797) Change-Id: Id44938504df00c3aba3fe733e7c71ad37ce1aab7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745838 Commit-Queue: Cody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 4bb50faa
...@@ -3913,7 +3913,21 @@ void Context::framebufferTexture3D(GLenum target, ...@@ -3913,7 +3913,21 @@ void Context::framebufferTexture3D(GLenum target,
GLint level, GLint level,
GLint zoffset) GLint zoffset)
{ {
UNIMPLEMENTED(); Framebuffer *framebuffer = mState.getTargetFramebuffer(target);
ASSERT(framebuffer);
if (texture.value != 0)
{
Texture *textureObj = getTexture(texture);
ImageIndex index = ImageIndex::Make3D(level, zoffset);
framebuffer->setAttachment(this, GL_TEXTURE, attachment, index, textureObj);
}
else
{
framebuffer->resetAttachment(this, attachment);
}
mState.setObjectDirty(target);
} }
void Context::framebufferRenderbuffer(GLenum target, void Context::framebufferRenderbuffer(GLenum target,
......
...@@ -32,8 +32,8 @@ ...@@ -32,8 +32,8 @@
// Depth/stencil related failures. // Depth/stencil related failures.
3457 VULKAN : KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil = FAIL 3457 VULKAN : KHR-GLES2.core.internalformat.texture2d.depth_stencil_unsigned_int_24_8_depth_stencil = FAIL
// 3d texture framebuffer tests // Test bug, use of sized internal format. Passes with patch from bug.
3188 VULKAN : KHR-GLES2.texture_3d.framebuffer_texture.rgba8 = SKIP 3797 VULKAN : KHR-GLES2.texture_3d.framebuffer_texture.rgba8 = SKIP
// GL_RGBA8 is not supported in GLES2 // GL_RGBA8 is not supported in GLES2
// GL_OES_rgb8_rgba8 only enables GL_RGBA8 for render buffers (not textures) // GL_OES_rgb8_rgba8 only enables GL_RGBA8 for render buffers (not textures)
......
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