1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[spirv] Add OpArrayLength instruction

This commit is contained in:
Philip Rebohle 2018-12-13 13:36:27 +01:00
parent 328871de7e
commit 0d230eb447
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 20 additions and 0 deletions

View File

@ -755,6 +755,21 @@ namespace dxvk {
m_code.putInt32(indexArray[i]);
return resultId;
}
uint32_t SpirvModule::opArrayLength(
uint32_t resultType,
uint32_t structure,
uint32_t memberId) {
uint32_t resultId = this->allocateId();
m_code.putIns (spv::OpArrayLength, 5);
m_code.putWord(resultType);
m_code.putWord(resultId);
m_code.putWord(structure);
m_code.putWord(memberId);
return resultId;
}
uint32_t SpirvModule::opAny(

View File

@ -308,6 +308,11 @@ namespace dxvk {
uint32_t indexCount,
const uint32_t* indexArray);
uint32_t opArrayLength(
uint32_t resultType,
uint32_t structure,
uint32_t memberId);
uint32_t opAny(
uint32_t resultType,
uint32_t vector);