File tree Expand file tree Collapse file tree 2 files changed +18
-13
lines changed Expand file tree Collapse file tree 2 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -451,22 +451,27 @@ uint PayloadMapping::GetNonAdjustedNumPayloadElements_Sample(const SampleIntrins
451
451
numSources = numOperands - 3 ;
452
452
}
453
453
454
- // Check for valid number of sources from the end of the list
455
- for (uint i = (numSources - 1 ); i >= 1 ; i--)
454
+ llvm::Type* cubeTextureType = GetResourceDimensionType (*inst->getModule (), RESOURCE_DIMENSION_TYPE::DIM_CUBE_TYPE);
455
+ llvm::Type* textureType = inst->getTextureValue ()->getType ()->getPointerElementType ();
456
+ if (textureType != cubeTextureType)
456
457
{
457
- if (IsUndefOrZeroImmediate (inst->getOperand (i)))
458
- {
459
- numSources--;
460
- }
461
- else
458
+ // Check for valid number of sources from the end of the list
459
+ for (uint i = (numSources - 1 ); i >= 1 ; i--)
462
460
{
463
- break ;
461
+ if (IsUndefOrZeroImmediate (inst->getOperand (i)))
462
+ {
463
+ numSources--;
464
+ }
465
+ else
466
+ {
467
+ break ;
468
+ }
464
469
}
465
- }
466
470
467
- // temp solution to send valid sources but having 0 as their values.
468
- EOPCODE opCode = GetOpCode (inst);
469
- ValidateNumberofSources (opCode, numSources);
471
+ // temp solution to send valid sources but having 0 as their values.
472
+ EOPCODE opCode = GetOpCode (inst);
473
+ ValidateNumberofSources (opCode, numSources);
474
+ }
470
475
471
476
if (IsZeroLOD (inst))
472
477
{
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ namespace IGC
60
60
}
61
61
}
62
62
63
- inline llvm::Type* GetResourceDimensionType (llvm::Module& module , RESOURCE_DIMENSION_TYPE resourceDimTypeId)
63
+ inline llvm::Type* GetResourceDimensionType (const llvm::Module& module , RESOURCE_DIMENSION_TYPE resourceDimTypeId)
64
64
{
65
65
IGC_ASSERT ((resourceDimTypeId == DIM_TYPED_BUFFER_TYPE ||
66
66
resourceDimTypeId == DIM_1D_TYPE || resourceDimTypeId == DIM_1D_ARRAY_TYPE ||
You can’t perform that action at this time.
0 commit comments