@@ -287,15 +287,15 @@ void LatteDecompiler_analyzeTEXClause(LatteDecompilerShaderContext* shaderContex
287
287
LatteDecompilerShader* shader = shaderContext->shader ;
288
288
for (auto & texInstruction : cfInstruction->instructionsTEX )
289
289
{
290
- if ( texInstruction.opcode == GPU7_TEX_INST_SAMPLE ||
291
- texInstruction.opcode == GPU7_TEX_INST_SAMPLE_L ||
292
- texInstruction.opcode == GPU7_TEX_INST_SAMPLE_LB ||
293
- texInstruction.opcode == GPU7_TEX_INST_SAMPLE_LZ ||
294
- texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C ||
290
+ if ( texInstruction.opcode == GPU7_TEX_INST_SAMPLE ||
291
+ texInstruction.opcode == GPU7_TEX_INST_SAMPLE_L ||
292
+ texInstruction.opcode == GPU7_TEX_INST_SAMPLE_LB ||
293
+ texInstruction.opcode == GPU7_TEX_INST_SAMPLE_LZ ||
294
+ texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C ||
295
295
texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C_L ||
296
296
texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C_LZ ||
297
- texInstruction.opcode == GPU7_TEX_INST_FETCH4 ||
298
- texInstruction.opcode == GPU7_TEX_INST_SAMPLE_G ||
297
+ texInstruction.opcode == GPU7_TEX_INST_FETCH4 ||
298
+ texInstruction.opcode == GPU7_TEX_INST_SAMPLE_G ||
299
299
texInstruction.opcode == GPU7_TEX_INST_LD )
300
300
{
301
301
if (texInstruction.textureFetch .textureIndex < 0 || texInstruction.textureFetch .textureIndex >= LATTE_NUM_MAX_TEX_UNITS)
@@ -313,7 +313,7 @@ void LatteDecompiler_analyzeTEXClause(LatteDecompilerShaderContext* shaderContex
313
313
shader->textureUnitSamplerAssignment [texInstruction.textureFetch .textureIndex ] = texInstruction.textureFetch .samplerIndex ;
314
314
if ( texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C || texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C_L || texInstruction.opcode == GPU7_TEX_INST_SAMPLE_C_LZ)
315
315
shader->textureUsesDepthCompare [texInstruction.textureFetch .textureIndex ] = true ;
316
-
316
+
317
317
bool useTexelCoords = false ;
318
318
if (texInstruction.opcode == GPU7_TEX_INST_SAMPLE && (texInstruction.textureFetch .unnormalized [0 ] && texInstruction.textureFetch .unnormalized [1 ] && texInstruction.textureFetch .unnormalized [2 ] && texInstruction.textureFetch .unnormalized [3 ]))
319
319
useTexelCoords = true ;
@@ -393,7 +393,7 @@ void LatteDecompiler_analyzeExport(LatteDecompilerShaderContext* shaderContext,
393
393
}
394
394
else if ( cfInstruction->exportType == 0 && cfInstruction->exportArrayBase == 61 )
395
395
{
396
- // writes pixel depth
396
+ shader-> depthWritten = true ;
397
397
}
398
398
else
399
399
debugBreakpoint ();
@@ -419,7 +419,7 @@ void LatteDecompiler_analyzeExport(LatteDecompilerShaderContext* shaderContext,
419
419
void LatteDecompiler_analyzeSubroutine (LatteDecompilerShaderContext* shaderContext, uint32 cfAddr)
420
420
{
421
421
// analyze CF and clauses up to RET statement
422
-
422
+
423
423
// todo - find cfInstruction index from cfAddr
424
424
cemu_assert_debug (false );
425
425
@@ -505,9 +505,9 @@ namespace LatteDecompiler
505
505
decompilerContext->hasUniformVarBlock = true ;
506
506
else if (decompilerContext->shader ->uniformMode == LATTE_DECOMPILER_UNIFORM_MODE_FULL_CFILE)
507
507
decompilerContext->hasUniformVarBlock = true ;
508
-
509
- bool hasAnyViewportScaleDisabled =
510
- !decompilerContext->contextRegistersNew ->PA_CL_VTE_CNTL .get_VPORT_X_SCALE_ENA () ||
508
+
509
+ bool hasAnyViewportScaleDisabled =
510
+ !decompilerContext->contextRegistersNew ->PA_CL_VTE_CNTL .get_VPORT_X_SCALE_ENA () ||
511
511
!decompilerContext->contextRegistersNew ->PA_CL_VTE_CNTL .get_VPORT_Y_SCALE_ENA () ||
512
512
!decompilerContext->contextRegistersNew ->PA_CL_VTE_CNTL .get_VPORT_Z_SCALE_ENA ();
513
513
// we currently only support all on/off. Individual component scaling is not supported
@@ -803,7 +803,7 @@ void LatteDecompiler_analyze(LatteDecompilerShaderContext* shaderContext, LatteD
803
803
804
804
for (sint32 i=0 ; i<LATTE_NUM_MAX_TEX_UNITS; i++)
805
805
{
806
- if (!shaderContext->output ->textureUnitMask [i])
806
+ if (!shaderContext->output ->textureUnitMask [i])
807
807
{
808
808
// texture unit not used
809
809
shader->textureUnitDim [i] = (Latte::E_DIM)0xFF ;
0 commit comments