Merge branch 'master' into d3d12

This commit is contained in:
Triang3l
2018-10-22 23:15:07 +03:00
committed by GitHub
7 changed files with 61 additions and 42 deletions

View File

@@ -114,6 +114,8 @@ inline TextureFormat GetBaseFormat(TextureFormat texture_format) {
return TextureFormat::k_10_11_11;
case TextureFormat::k_11_11_10_AS_16_16_16_16:
return TextureFormat::k_11_11_10;
case TextureFormat::k_8_8_8_8_GAMMA:
return TextureFormat::k_8_8_8_8;
default:
break;
}
@@ -211,6 +213,7 @@ inline bool IsSRGBCapable(TextureFormat format) {
case TextureFormat::k_2_10_10_10_AS_16_16_16_16:
case TextureFormat::k_10_11_11_AS_16_16_16_16:
case TextureFormat::k_11_11_10_AS_16_16_16_16:
case TextureFormat::k_8_8_8_8_GAMMA:
return true;
default:
return false;

View File

@@ -56,7 +56,7 @@ const TextureConfig texture_configs[64] = {
/* k_8_8 */ ___(R8G8_UNORM),
/* k_Cr_Y1_Cb_Y0_REP */ ___(UNDEFINED),
/* k_Y1_Cr_Y0_Cb_REP */ ___(UNDEFINED),
/* k_16_16_EDRAM */ ___(R16G16_UNORM),
/* k_16_16_EDRAM */ ___(UNDEFINED),
/* k_8_8_8_8_A */ ___(UNDEFINED),
/* k_4_4_4_4 */ __v(R4G4B4A4_UNORM_PACK16, YXWZ),
// TODO: Verify if these two are correct (I think not).
@@ -66,7 +66,7 @@ const TextureConfig texture_configs[64] = {
/* k_DXT1 */ ___(BC1_RGBA_UNORM_BLOCK),
/* k_DXT2_3 */ ___(BC2_UNORM_BLOCK),
/* k_DXT4_5 */ ___(BC3_UNORM_BLOCK),
/* k_16_16_16_16_EDRAM */ ___(R16G16B16A16_UNORM),
/* k_16_16_16_16_EDRAM */ ___(UNDEFINED),
// TODO: D24 unsupported on AMD.
/* k_24_8 */ ___(D24_UNORM_S8_UINT),
@@ -121,7 +121,7 @@ const TextureConfig texture_configs[64] = {
/* k_DXT3A_AS_1_1_1_1 */ ___(UNDEFINED),
/* k_8_8_8_8_GAMMA_EDRAM */ ___(R8G8B8A8_UNORM),
/* k_8_8_8_8_GAMMA_EDRAM */ ___(UNDEFINED),
/* k_2_10_10_10_FLOAT_EDRAM */ ___(UNDEFINED),
};

View File

@@ -180,7 +180,7 @@ enum class DepthRenderTargetFormat : uint32_t {
kD24FS8 = 1,
};
// Subset of a2xx_sq_surfaceformat.
// Subset of a2xx_sq_surfaceformat - formats that RTs can be resolved to.
enum class ColorFormat : uint32_t {
k_8 = 2,
k_1_5_5_5 = 3,
@@ -204,8 +204,10 @@ enum class ColorFormat : uint32_t {
k_32_FLOAT = 36,
k_32_32_FLOAT = 37,
k_32_32_32_32_FLOAT = 38,
kUnknown0x36 = 0x36, // not sure, but like 8888
k_8_8_8_8_AS_16_16_16_16 = 50,
k_2_10_10_10_AS_16_16_16_16 = 54,
k_10_11_11_AS_16_16_16_16 = 55,
k_11_11_10_AS_16_16_16_16 = 56,
};
enum class VertexFormat : uint32_t {