mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +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(
|
||||
bool v) {
|
||||
uint32_t typeId = this->defBoolType();
|
||||
@ -767,8 +774,8 @@ namespace dxvk {
|
||||
void SpirvModule::functionEnd() {
|
||||
m_code.putIns (spv::OpFunctionEnd, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
uint32_t SpirvModule::opAccessChain(
|
||||
uint32_t resultType,
|
||||
uint32_t composite,
|
||||
@ -3059,24 +3066,30 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
uint32_t SpirvModule::opGroupNonUniformLogicalAnd(
|
||||
uint32_t SpirvModule::opGroupNonUniformElect(
|
||||
uint32_t resultType,
|
||||
uint32_t execution,
|
||||
uint32_t operation,
|
||||
uint32_t value,
|
||||
uint32_t clusterSize) {
|
||||
uint32_t execution) {
|
||||
uint32_t resultId = this->allocateId();
|
||||
|
||||
m_code.putIns(spv::OpGroupNonUniformLogicalAnd,
|
||||
6 + (clusterSize ? 1 : 0));
|
||||
m_code.putIns(spv::OpGroupNonUniformElect, 4);
|
||||
m_code.putWord(resultType);
|
||||
m_code.putWord(resultId);
|
||||
m_code.putWord(execution);
|
||||
m_code.putWord(operation);
|
||||
m_code.putWord(value);
|
||||
return resultId;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -164,6 +164,9 @@ namespace dxvk {
|
||||
uint32_t constCount,
|
||||
const uint32_t* constIds);
|
||||
|
||||
uint32_t constUndef(
|
||||
uint32_t typeId);
|
||||
|
||||
uint32_t specConstBool(
|
||||
bool v);
|
||||
|
||||
@ -310,7 +313,7 @@ namespace dxvk {
|
||||
uint32_t parameterType);
|
||||
|
||||
void functionEnd();
|
||||
|
||||
|
||||
uint32_t opAccessChain(
|
||||
uint32_t resultType,
|
||||
uint32_t composite,
|
||||
@ -1053,12 +1056,14 @@ namespace dxvk {
|
||||
uint32_t operation,
|
||||
uint32_t ballot);
|
||||
|
||||
uint32_t opGroupNonUniformLogicalAnd(
|
||||
uint32_t opGroupNonUniformElect(
|
||||
uint32_t resultType,
|
||||
uint32_t execution);
|
||||
|
||||
uint32_t opGroupNonUniformBroadcastFirst(
|
||||
uint32_t resultType,
|
||||
uint32_t execution,
|
||||
uint32_t operation,
|
||||
uint32_t value,
|
||||
uint32_t clusterSize);
|
||||
uint32_t value);
|
||||
|
||||
void opControlBarrier(
|
||||
uint32_t execution,
|
||||
|
Loading…
x
Reference in New Issue
Block a user