From 64c8d7ab98aba534893788dcb0634728268dce60 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sun, 15 Mar 2015 02:05:01 -0700 Subject: [PATCH] MRTs and some more texture formats. --- src/xenia/gpu/gl4/gl4_shader_translator.cc | 9 +++++++++ src/xenia/gpu/gl4/texture_cache.cc | 15 ++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/xenia/gpu/gl4/gl4_shader_translator.cc b/src/xenia/gpu/gl4/gl4_shader_translator.cc index 53100980c..e1685ecf6 100644 --- a/src/xenia/gpu/gl4/gl4_shader_translator.cc +++ b/src/xenia/gpu/gl4/gl4_shader_translator.cc @@ -455,6 +455,15 @@ void GL4ShaderTranslator::AppendOpDestRegName(const ucode::instr_alu_t& op, case 63: // ? masked? Append("oC[0]"); break; + case 1: + Append("oC[1]"); + break; + case 2: + Append("oC[2]"); + break; + case 3: + Append("oC[3]"); + break; case 61: Append("gl_FragDepth"); break; diff --git a/src/xenia/gpu/gl4/texture_cache.cc b/src/xenia/gpu/gl4/texture_cache.cc index 0503e90c4..3dba9dd73 100644 --- a/src/xenia/gpu/gl4/texture_cache.cc +++ b/src/xenia/gpu/gl4/texture_cache.cc @@ -73,16 +73,13 @@ static const TextureConfig texture_configs[64] = { GL_UNSIGNED_INT_24_8}, {TextureFormat::k_24_8_FLOAT, GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_FLOAT_32_UNSIGNED_INT_24_8_REV}, - {TextureFormat::k_16, GL_INVALID_ENUM, GL_INVALID_ENUM, GL_INVALID_ENUM}, + {TextureFormat::k_16, GL_R16, GL_RED, GL_UNSIGNED_SHORT}, {TextureFormat::k_16_16, GL_RG16, GL_RG, GL_UNSIGNED_SHORT}, - {TextureFormat::k_16_16_16_16, GL_INVALID_ENUM, GL_INVALID_ENUM, - GL_INVALID_ENUM}, - {TextureFormat::k_16_EXPAND, GL_INVALID_ENUM, GL_INVALID_ENUM, - GL_INVALID_ENUM}, - {TextureFormat::k_16_16_EXPAND, GL_INVALID_ENUM, GL_INVALID_ENUM, - GL_INVALID_ENUM}, - {TextureFormat::k_16_16_16_16_EXPAND, GL_INVALID_ENUM, GL_INVALID_ENUM, - GL_INVALID_ENUM}, + {TextureFormat::k_16_16_16_16, GL_RGBA16, GL_RGBA, GL_UNSIGNED_SHORT}, + {TextureFormat::k_16_EXPAND, GL_R16, GL_RED, GL_UNSIGNED_SHORT}, + {TextureFormat::k_16_16_EXPAND, GL_RG16, GL_RG, GL_UNSIGNED_SHORT}, + {TextureFormat::k_16_16_16_16_EXPAND, GL_RGBA16, GL_RGBA, + GL_UNSIGNED_SHORT}, {TextureFormat::k_16_FLOAT, GL_R16F, GL_RED, GL_HALF_FLOAT}, {TextureFormat::k_16_16_FLOAT, GL_RG16F, GL_RG, GL_HALF_FLOAT}, {TextureFormat::k_16_16_16_16_FLOAT, GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT},