mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[spirv] Add support for 32-bit specialization constants
This commit is contained in:
parent
b78130defd
commit
27816b470a
@ -340,6 +340,19 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
uint32_t SpirvModule::specConst32(
|
||||||
|
uint32_t typeId,
|
||||||
|
uint32_t value) {
|
||||||
|
uint32_t resultId = this->allocateId();
|
||||||
|
|
||||||
|
m_typeConstDefs.putIns (spv::OpSpecConstant, 4);
|
||||||
|
m_typeConstDefs.putWord (typeId);
|
||||||
|
m_typeConstDefs.putWord (resultId);
|
||||||
|
m_typeConstDefs.putWord (value);
|
||||||
|
return resultId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SpirvModule::decorate(
|
void SpirvModule::decorate(
|
||||||
uint32_t object,
|
uint32_t object,
|
||||||
spv::Decoration decoration) {
|
spv::Decoration decoration) {
|
||||||
|
@ -158,6 +158,10 @@ namespace dxvk {
|
|||||||
uint32_t specConstBool(
|
uint32_t specConstBool(
|
||||||
bool v);
|
bool v);
|
||||||
|
|
||||||
|
uint32_t specConst32(
|
||||||
|
uint32_t typeId,
|
||||||
|
uint32_t value);
|
||||||
|
|
||||||
void decorate(
|
void decorate(
|
||||||
uint32_t object,
|
uint32_t object,
|
||||||
spv::Decoration decoration);
|
spv::Decoration decoration);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user