Merge pull request #573 from polybiusproxy/shader_recompiler/format

shader_recompiler/frontend: Miscellaneous fixes
This commit is contained in:
georgemoralis 2024-09-04 23:21:23 +03:00 committed by GitHub
commit 0dd6e257c5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 7 deletions

View file

@ -5,6 +5,8 @@
#include "common/assert.h"
#include "shader_recompiler/frontend/decode.h"
#include "magic_enum.hpp"
namespace Shader::Gcn {
namespace bit {
@ -253,7 +255,9 @@ void GcnDecodeContext::updateInstructionMeta(InstEncoding encoding) {
ASSERT_MSG(instFormat.src_type != ScalarType::Undefined &&
instFormat.dst_type != ScalarType::Undefined,
"TODO: Instruction format table not complete, please fix it manually.");
"Instruction format table incomplete for opcode {} ({}, encoding = {})",
magic_enum::enum_name(m_instruction.opcode), u32(m_instruction.opcode),
magic_enum::enum_name(encoding));
m_instruction.inst_class = instFormat.inst_class;
m_instruction.category = instFormat.inst_category;

View file

@ -1786,8 +1786,7 @@ constexpr std::array<InstFormat, 455> InstructionFormatVOP3 = {{
constexpr std::array<InstFormat, 71> InstructionFormatVOP1 = {{
// 0 = V_NOP
{InstClass::VectorMisc, InstCategory::VectorALU, 0, 1, ScalarType::Undefined,
ScalarType::Undefined},
{InstClass::VectorMisc, InstCategory::VectorALU, 0, 1, ScalarType::Any, ScalarType::Any},
// 1 = V_MOV_B32
{InstClass::VectorRegMov, InstCategory::VectorALU, 1, 1, ScalarType::Uint32,
ScalarType::Uint32},
@ -3603,8 +3602,8 @@ constexpr std::array<InstFormat, 112> InstructionFormatMIMG = {{
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined,
ScalarType::Undefined},
// 79 = IMAGE_GATHER4_C_LZ
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined,
ScalarType::Undefined},
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Uint32,
ScalarType::Uint32},
// 80 = IMAGE_GATHER4_O
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined,
ScalarType::Undefined},
@ -3656,8 +3655,8 @@ constexpr std::array<InstFormat, 112> InstructionFormatMIMG = {{
{},
{},
// 104 = IMAGE_SAMPLE_CD
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined,
ScalarType::Undefined},
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Float32,
ScalarType::Float32},
// 105 = IMAGE_SAMPLE_CD_CL
{InstClass::VectorMemImgSmp, InstCategory::VectorMemory, 4, 1, ScalarType::Undefined,
ScalarType::Undefined},