implement V_CMP_NGT_F32

This commit is contained in:
Asuka 2022-06-19 01:44:17 +08:00
parent 883b813f41
commit 65b950a685
3 changed files with 17 additions and 2 deletions

View file

@ -444,6 +444,9 @@ namespace sce::gcn
uint32_t condition = 0;
uint32_t conditionType = m_module.defBoolType();
// TODO:
// unordered float support.
bool updateExec = false;
auto op = ins.opcode;
@ -484,6 +487,11 @@ namespace sce::gcn
src[0].low.id,
src[1].low.id);
break;
case GcnOpcode::V_CMP_NGT_F32:
condition = m_module.opFOrdLessThanEqual(conditionType,
src[0].low.id,
src[1].low.id);
break;
case GcnOpcode::V_CMP_GE_F32:
condition = m_module.opFOrdGreaterThanEqual(conditionType,
src[0].low.id,

View file

@ -58,8 +58,6 @@ namespace sce::gcn
void GcnCompiler::emitVectorMemImgSmp(const GcnShaderInstruction& ins)
{
auto mimg = gcnInstructionAs<GcnShaderInstMIMG>(ins);
auto op = ins.opcode;
switch (op)
{

View file

@ -57,6 +57,15 @@ namespace sce::Gnm
// it's likely because there are some GnmDriver functions not implemented,
// so no proper private packets being inserted into the command buffer.
// TODO:
// There is a similar dispatch function in
// PS4RazorGPUDLL.dll
// Version: 8.0.0.2
// MD5: EBB9C82A6F451F0BA240BE17B0DC78A8
// Offset: 0x1802C6D90 (Base: 180001000)
// We may get more correct result by reverse engineering
// that function.
const PM4_HEADER* pm4Hdr = reinterpret_cast<const PM4_HEADER*>(commandBuffer);
uint32_t processedCmdSize = 0;