mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Merge pull request #550 from wheremyfoodat/shader-stuffs
Remove shader-related hallucinations
This commit is contained in:
commit
91f8f81418
3 changed files with 3 additions and 6 deletions
|
@ -220,13 +220,9 @@ class PICAShader {
|
||||||
public:
|
public:
|
||||||
static constexpr size_t maxInstructionCount = 4096;
|
static constexpr size_t maxInstructionCount = 4096;
|
||||||
std::array<u32, maxInstructionCount> loadedShader; // Currently loaded & active shader
|
std::array<u32, maxInstructionCount> loadedShader; // Currently loaded & active shader
|
||||||
std::array<u32, maxInstructionCount> bufferedShader; // Shader to be transferred when the SH_CODETRANSFER_END reg gets written to
|
|
||||||
|
|
||||||
PICAShader(ShaderType type) : type(type) {}
|
PICAShader(ShaderType type) : type(type) {}
|
||||||
|
|
||||||
// Theese functions are in the header to be inlined more easily, though with LTO I hope I'll be able to move them
|
|
||||||
void finalize() { std::memcpy(&loadedShader[0], &bufferedShader[0], 4096 * sizeof(u32)); }
|
|
||||||
|
|
||||||
void setBufferIndex(u32 index) { bufferIndex = index & 0xfff; }
|
void setBufferIndex(u32 index) { bufferIndex = index & 0xfff; }
|
||||||
void setOpDescriptorIndex(u32 index) { opDescriptorIndex = index & 0x7f; }
|
void setOpDescriptorIndex(u32 index) { opDescriptorIndex = index & 0x7f; }
|
||||||
|
|
||||||
|
@ -235,7 +231,7 @@ class PICAShader {
|
||||||
Helpers::panic("o no, shader upload overflew");
|
Helpers::panic("o no, shader upload overflew");
|
||||||
}
|
}
|
||||||
|
|
||||||
bufferedShader[bufferIndex++] = word;
|
loadedShader[bufferIndex++] = word;
|
||||||
bufferIndex &= 0xfff;
|
bufferIndex &= 0xfff;
|
||||||
|
|
||||||
codeHashDirty = true; // Signal the JIT if necessary that the program hash has potentially changed
|
codeHashDirty = true; // Signal the JIT if necessary that the program hash has potentially changed
|
||||||
|
|
|
@ -329,9 +329,11 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Find out if this actually does anything
|
||||||
case VertexShaderTransferEnd:
|
case VertexShaderTransferEnd:
|
||||||
if (value != 0) shaderUnit.vs.finalize();
|
if (value != 0) shaderUnit.vs.finalize();
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
|
|
||||||
case VertexShaderTransferIndex: shaderUnit.vs.setBufferIndex(value); break;
|
case VertexShaderTransferIndex: shaderUnit.vs.setBufferIndex(value); break;
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ void ShaderUnit::reset() {
|
||||||
|
|
||||||
void PICAShader::reset() {
|
void PICAShader::reset() {
|
||||||
loadedShader.fill(0);
|
loadedShader.fill(0);
|
||||||
bufferedShader.fill(0);
|
|
||||||
operandDescriptors.fill(0);
|
operandDescriptors.fill(0);
|
||||||
|
|
||||||
boolUniform = 0;
|
boolUniform = 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue