mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-20 20:49:12 +12:00
[PICA] Implement int uniforms
This commit is contained in:
parent
4cda023c22
commit
a5c6fb858f
5 changed files with 25 additions and 3 deletions
|
@ -100,6 +100,10 @@ void GPU::writeInternalReg(u32 index, u32 value, u32 mask) {
|
|||
shaderUnit.vs.uploadDescriptor(value);
|
||||
break;
|
||||
|
||||
case VertexIntUniform0: case VertexIntUniform1: case VertexIntUniform2: case VertexIntUniform3:
|
||||
shaderUnit.vs.uploadIntUniform(index - VertexIntUniform0, value);
|
||||
break;
|
||||
|
||||
case VertexShaderTransferEnd:
|
||||
if (value != 0) shaderUnit.vs.finalize();
|
||||
break;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "PICA/shader.hpp"
|
||||
|
||||
void PICAShader::run() {
|
||||
u32 pc = 0; // Program counter
|
||||
pc = 0;
|
||||
|
||||
while (true) {
|
||||
const u32 instruction = loadedShader[pc++];
|
||||
|
|
|
@ -10,7 +10,6 @@ void PICAShader::reset() {
|
|||
bufferedShader.fill(0);
|
||||
operandDescriptors.fill(0);
|
||||
|
||||
intUniforms.fill(0);
|
||||
boolUniform = 0;
|
||||
bufferIndex = 0;
|
||||
floatUniformIndex = 0;
|
||||
|
@ -24,6 +23,10 @@ void PICAShader::reset() {
|
|||
outputs.fill(zero);
|
||||
tempRegisters.fill(zero);
|
||||
|
||||
for (auto& e : intUniforms) {
|
||||
e.x() = e.y() = e.z() = e.w() = 0;
|
||||
}
|
||||
|
||||
addrRegister.x() = 0;
|
||||
addrRegister.y() = 0;
|
||||
loopCounter = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue