D3D11: Don't use DXGI to GL format map in copy functions
The swizzle or copy shader needs to be chosen according to the
component type of the source SRV. Before this patch, the component
type was obtained by going through the mapping from the SRV DXGI
formats to GL formats.
This mapping is problematic, because it has entries that don't really
make sense, like R16_UNORM and R16_TYPELESS formats being mapped to
GL_DEPTH_COMPONENT16. This is an issue particularly because these
formats will be used for integer RED textures in the future. For
this reason the mapping should be removed.
In the case addressed by this specific commit, rather than look up the
component type of the SRV indirectly through the GL format table using
the GL internal format that corresponds to the DXGI format, just use
the component type of the DXGI format. The depth+stencil swizzle cases
where the component type is not well defined are handled as a special
case.
BUG=angleproject:1244
TEST=angle_end2end_tests,
dEQP-GLES3.functional.texture.swizzle.* (all pass),
dEQP-GLES3.functional.fbo.blit.* (no regressions)
Change-Id: I39fb8a14921b89d299e0077b3bea8b4e66ef218d
Reviewed-on: https://chromium-review.googlesource.com/329103
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by:
Jamie Madill <jmadill@chromium.org>
Showing
Please
register
or
sign in
to comment