OSDN Git Service

Implement missing depth/stencil formats.
authorNicolas Capens <capn@google.com>
Thu, 14 Dec 2017 03:25:04 +0000 (22:25 -0500)
committerNicolas Capens <nicolascapens@google.com>
Thu, 14 Dec 2017 15:39:56 +0000 (15:39 +0000)
commit57e7cea706d4e61c1423f0516bfc223c9d51e052
tree586787e058d895fcc13af760c7134d63c9234f32
parent8536a44ae39b5adeb4b82a7b646cad329e489004
Implement missing depth/stencil formats.

Several depth-only formats were implemented using depth+stencil
formats. This resulted in unintended stencil operations happening, as
well as unnecessary allocations and blitting of stencil data.

This change also introduces quad-layout depth+stencil formats for more
efficient rendering.

Note that as before the 'internal' buffer's format also indicates the
presence of a stencil component, even though it only stores the depth
component, while the 'stencil' buffer now has an S8 format or NULL for
a depth-only format.

Change-Id: I245f0cb5a999851e24082f3ab1ea78a5f5956af3
Reviewed-on: https://swiftshader-review.googlesource.com/14988
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
src/OpenGL/common/Image.cpp
src/OpenGL/libGLESv2/Device.cpp
src/OpenGL/libGLESv2/Renderbuffer.cpp
src/OpenGL/libGLESv2/utilities.cpp
src/Renderer/Blitter.cpp
src/Renderer/Surface.cpp
src/Renderer/Surface.hpp
src/Shader/SamplerCore.cpp