mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 11:36:13 +00:00
rsx: Restore component mapping override for depth textures
This commit is contained in:
parent
7e32e7343a
commit
58035697d5
2 changed files with 24 additions and 0 deletions
|
@ -758,6 +758,18 @@ namespace gl
|
|||
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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 = {};
|
||||
switch (flags)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue