Skip to content

Commit 7b8b6da

Browse files
iwwuigcbot
authored andcommitted
Eliminate samples with the same texture coordinates
Adding ReassociatePass before GVN pass ensures the second sample gets eliminated.
1 parent c24729e commit 7b8b6da

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

IGC/Compiler/CISACodeGen/ShaderCodeGen.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,9 @@ void OptimizeIR(CodeGenContext *const pContext) {
14111411
if (IGC_IS_FLAG_ENABLED(OCLEnableReassociate) && pContext->type == ShaderType::OPENCL_SHADER) {
14121412
mpm.add(createReassociatePass());
14131413
}
1414+
if (pContext->type == ShaderType::COMPUTE_SHADER) {
1415+
mpm.add(llvm::createReassociatePass());
1416+
}
14141417

14151418
mpm.add(createPromoteConstantStructsPass());
14161419

0 commit comments

Comments
 (0)