MCPcopy Create free account
hub / github.com/InoriRus/Kyty / Run

Method Run

source/emulator/src/Graphics/GraphicsRun.cpp:989–1028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987}
988
989void CommandProcessor::Run(uint32_t* data, uint32_t num_dw)
990{
991 KYTY_PROFILER_BLOCK("CommandProcessor::Run");
992
993 if (num_dw > 0)
994 {
995 GraphicsRenderMemoryFree(reinterpret_cast<uint64_t>(data), static_cast<size_t>(num_dw) * 4);
996 }
997
998 auto* cmd = data;
999 auto dw = num_dw;
1000 for (;;)
1001 {
1002 if (dw == 0)
1003 {
1004 break;
1005 }
1006
1007 EXIT_NOT_IMPLEMENTED(dw < 2);
1008 EXIT_NOT_IMPLEMENTED(dw > num_dw);
1009
1010 auto cmd_id = *cmd++;
1011
1012 auto op = (cmd_id >> 8u) & 0xffu;
1013
1014 auto pfunc = g_cp_op_func[op];
1015
1016 if (pfunc == nullptr)
1017 {
1018 EXIT("unknown op\n\t%05" PRIx32 ":\n\tcmd_id = %08" PRIx32 "\n", num_dw - dw, cmd_id);
1019 }
1020
1021 auto s = pfunc(this, cmd_id, cmd, dw, num_dw);
1022
1023 // printf("\t %05" PRIx32 ": %u\n", num_dw - dw, s);
1024
1025 cmd += s;
1026 dw -= s + 1;
1027 }
1028}
1029
1030void CommandProcessor::SetIndexType(uint32_t index_type_and_size)
1031{

Callers 4

ThreadBatchRunMethod · 0.45
ThreadRunMethod · 0.45
KYTY_CP_OP_PARSERFunction · 0.45
SpirvRunFunction · 0.45

Calls 1

GraphicsRenderMemoryFreeFunction · 0.85

Tested by

no test coverage detected