Commit fb9c05cc by Lingfeng Yang

Allow 3d texture layers for framebuffer blit

b/135141616 Change-Id: Ia3c804c0bef7a000a54359d24dcd8bacc063a121 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33508Tested-by: 's avatarLingfeng Yang <lfy@google.com> Kokoro-Presubmit: Lingfeng Yang <lfy@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 762741be
...@@ -4180,8 +4180,8 @@ void Context::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1 ...@@ -4180,8 +4180,8 @@ void Context::blitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1
{ {
GLenum readColorbufferType = readFramebuffer->getReadBufferType(); GLenum readColorbufferType = readFramebuffer->getReadBufferType();
GLenum drawColorbufferType = drawFramebuffer->getColorbufferType(0); GLenum drawColorbufferType = drawFramebuffer->getColorbufferType(0);
const bool validReadType = readColorbufferType == GL_TEXTURE_2D || readColorbufferType == GL_TEXTURE_RECTANGLE_ARB || Framebuffer::IsRenderbuffer(readColorbufferType); const bool validReadType = readColorbufferType == GL_TEXTURE_2D || readColorbufferType == GL_TEXTURE_RECTANGLE_ARB || readColorbufferType == GL_TEXTURE_2D_ARRAY || readColorbufferType == GL_TEXTURE_3D || Framebuffer::IsRenderbuffer(readColorbufferType);
const bool validDrawType = drawColorbufferType == GL_TEXTURE_2D || drawColorbufferType == GL_TEXTURE_RECTANGLE_ARB || Framebuffer::IsRenderbuffer(drawColorbufferType); const bool validDrawType = drawColorbufferType == GL_TEXTURE_2D || drawColorbufferType == GL_TEXTURE_RECTANGLE_ARB || readColorbufferType == GL_TEXTURE_2D_ARRAY || readColorbufferType == GL_TEXTURE_3D || Framebuffer::IsRenderbuffer(drawColorbufferType);
if(!validReadType || !validDrawType) if(!validReadType || !validDrawType)
{ {
return error(GL_INVALID_OPERATION); return error(GL_INVALID_OPERATION);
......
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