rsx: Restore component mapping override for depth textures
This commit is contained in:
@@ -758,6 +758,18 @@ namespace gl
|
|||||||
|
|
||||||
std::array<GLenum, 4> get_component_mapping(u32 gcm_format, rsx::texture_create_flags flags)
|
std::array<GLenum, 4> get_component_mapping(u32 gcm_format, rsx::texture_create_flags flags)
|
||||||
{
|
{
|
||||||
|
switch (gcm_format)
|
||||||
|
{
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH24_D8:
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH24_D8_FLOAT:
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH16:
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH16_FLOAT:
|
||||||
|
//Dont bother letting this propagate
|
||||||
|
return{ GL_RED, GL_RED, GL_RED, GL_RED };
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
switch (flags)
|
switch (flags)
|
||||||
{
|
{
|
||||||
case rsx::texture_create_flags::default_component_order:
|
case rsx::texture_create_flags::default_component_order:
|
||||||
|
|||||||
@@ -472,6 +472,18 @@ namespace vk
|
|||||||
|
|
||||||
VkComponentMapping apply_component_mapping_flags(u32 gcm_format, rsx::texture_create_flags flags, const texture_channel_remap_t& remap_vector)
|
VkComponentMapping apply_component_mapping_flags(u32 gcm_format, rsx::texture_create_flags flags, const texture_channel_remap_t& remap_vector)
|
||||||
{
|
{
|
||||||
|
switch (gcm_format)
|
||||||
|
{
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH24_D8:
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH24_D8_FLOAT:
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH16:
|
||||||
|
case CELL_GCM_TEXTURE_DEPTH16_FLOAT:
|
||||||
|
//Dont bother letting this propagate
|
||||||
|
return{ VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_R };
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
VkComponentMapping mapping = {};
|
VkComponentMapping mapping = {};
|
||||||
switch (flags)
|
switch (flags)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user