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)
1458014580 if (resource.m_resource->GetElemSize() < 4)
1458114581 {
1458214582 // vISA assumes all BTIs to be 32 bit. Need to cast, otherwise higher bits would be uninitialized.
14583+ unsigned numInstance = resource.m_resource->GetNumberInstance();
1458314584 CVariable* newResource = m_currShader->GetNewVariable(
1458414585 resource.m_resource->GetNumberElement(),
1458514586 ISA_TYPE_UD,
1458614587 resource.m_resource->IsUniform() ? EALIGN_DWORD : EALIGN_GRF,
14587- resource.m_resource->IsUniform());
14588+ resource.m_resource->IsUniform(),
14589+ numInstance);
14590+
1458814591 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+
1458914600 resource.m_resource = newResource;
1459014601 }
1459114602
You can’t perform that action at this time.
0 commit comments