mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 05:52:11 +01:00
[spirv] Add OpUndef and more subgroup instructions
This commit is contained in:
parent
d94d89c3ef
commit
dfa3caa946
@ -354,6 +354,13 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t SpirvModule::constUndef(
|
||||||
|
uint32_t typeId) {
|
||||||
|
return this->defConst(spv::OpUndef,
|
||||||
|
typeId, 0, nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t SpirvModule::specConstBool(
|
uint32_t SpirvModule::specConstBool(
|
||||||
bool v) {
|
bool v) {
|
||||||
uint32_t typeId = this->defBoolType();
|
uint32_t typeId = this->defBoolType();
|
||||||
@ -3059,24 +3066,30 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint32_t SpirvModule::opGroupNonUniformLogicalAnd(
|
uint32_t SpirvModule::opGroupNonUniformElect(
|
||||||
uint32_t resultType,
|
uint32_t resultType,
|
||||||
uint32_t execution,
|
uint32_t execution) {
|
||||||
uint32_t operation,
|
|
||||||
uint32_t value,
|
|
||||||
uint32_t clusterSize) {
|
|
||||||
uint32_t resultId = this->allocateId();
|
uint32_t resultId = this->allocateId();
|
||||||
|
|
||||||
m_code.putIns(spv::OpGroupNonUniformLogicalAnd,
|
m_code.putIns(spv::OpGroupNonUniformElect, 4);
|
||||||
6 + (clusterSize ? 1 : 0));
|
|
||||||
m_code.putWord(resultType);
|
m_code.putWord(resultType);
|
||||||
m_code.putWord(resultId);
|
m_code.putWord(resultId);
|
||||||
m_code.putWord(execution);
|
m_code.putWord(execution);
|
||||||
m_code.putWord(operation);
|
return resultId;
|
||||||
m_code.putWord(value);
|
}
|
||||||
|
|
||||||
if (clusterSize)
|
|
||||||
m_code.putWord(clusterSize);
|
uint32_t SpirvModule::opGroupNonUniformBroadcastFirst(
|
||||||
|
uint32_t resultType,
|
||||||
|
uint32_t execution,
|
||||||
|
uint32_t value) {
|
||||||
|
uint32_t resultId = this->allocateId();
|
||||||
|
|
||||||
|
m_code.putIns(spv::OpGroupNonUniformBroadcastFirst, 5);
|
||||||
|
m_code.putWord(resultType);
|
||||||
|
m_code.putWord(resultId);
|
||||||
|
m_code.putWord(execution);
|
||||||
|
m_code.putWord(value);
|
||||||
return resultId;
|
return resultId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,6 +164,9 @@ namespace dxvk {
|
|||||||
uint32_t constCount,
|
uint32_t constCount,
|
||||||
const uint32_t* constIds);
|
const uint32_t* constIds);
|
||||||
|
|
||||||
|
uint32_t constUndef(
|
||||||
|
uint32_t typeId);
|
||||||
|
|
||||||
uint32_t specConstBool(
|
uint32_t specConstBool(
|
||||||
bool v);
|
bool v);
|
||||||
|
|
||||||
@ -1053,12 +1056,14 @@ namespace dxvk {
|
|||||||
uint32_t operation,
|
uint32_t operation,
|
||||||
uint32_t ballot);
|
uint32_t ballot);
|
||||||
|
|
||||||
uint32_t opGroupNonUniformLogicalAnd(
|
uint32_t opGroupNonUniformElect(
|
||||||
|
uint32_t resultType,
|
||||||
|
uint32_t execution);
|
||||||
|
|
||||||
|
uint32_t opGroupNonUniformBroadcastFirst(
|
||||||
uint32_t resultType,
|
uint32_t resultType,
|
||||||
uint32_t execution,
|
uint32_t execution,
|
||||||
uint32_t operation,
|
uint32_t value);
|
||||||
uint32_t value,
|
|
||||||
uint32_t clusterSize);
|
|
||||||
|
|
||||||
void opControlBarrier(
|
void opControlBarrier(
|
||||||
uint32_t execution,
|
uint32_t execution,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user