File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -14580,12 +14580,23 @@ ResourceDescriptor EmitPass::GetResourceVariable(Value* resourcePtr)
14580
14580
if (resource.m_resource->GetElemSize() < 4)
14581
14581
{
14582
14582
// vISA assumes all BTIs to be 32 bit. Need to cast, otherwise higher bits would be uninitialized.
14583
+ unsigned numInstance = resource.m_resource->GetNumberInstance();
14583
14584
CVariable* newResource = m_currShader->GetNewVariable(
14584
14585
resource.m_resource->GetNumberElement(),
14585
14586
ISA_TYPE_UD,
14586
14587
resource.m_resource->IsUniform() ? EALIGN_DWORD : EALIGN_GRF,
14587
- resource.m_resource->IsUniform());
14588
+ resource.m_resource->IsUniform(),
14589
+ numInstance);
14590
+
14588
14591
m_encoder->Cast(newResource, resource.m_resource);
14592
+
14593
+ if (numInstance == 2)
14594
+ {
14595
+ m_encoder->SetSecondHalf(!m_encoder->IsSecondHalf());
14596
+ m_encoder->Cast(newResource, resource.m_resource);
14597
+ m_encoder->SetSecondHalf(!m_encoder->IsSecondHalf());
14598
+ }
14599
+
14589
14600
resource.m_resource = newResource;
14590
14601
}
14591
14602
You can’t perform that action at this time.
0 commit comments