mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[spirv] Add constvec2f32 helper
We should probably replace this with a proper template at some point.
This commit is contained in:
parent
b14ad7b30c
commit
8f5338b1d1
@ -297,6 +297,20 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
uint32_t SpirvModule::constvec2f32(
|
||||
float x,
|
||||
float y) {
|
||||
std::array<uint32_t, 2> args = {{
|
||||
this->constf32(x), this->constf32(y),
|
||||
}};
|
||||
|
||||
uint32_t scalarTypeId = this->defFloatType(32);
|
||||
uint32_t vectorTypeId = this->defVectorType(scalarTypeId, 2);
|
||||
|
||||
return this->constComposite(vectorTypeId, args.size(), args.data());
|
||||
}
|
||||
|
||||
|
||||
uint32_t SpirvModule::constvec3f32(
|
||||
float x,
|
||||
float y,
|
||||
|
@ -144,6 +144,10 @@ namespace dxvk {
|
||||
uint32_t z,
|
||||
uint32_t w);
|
||||
|
||||
uint32_t constvec2f32(
|
||||
float x,
|
||||
float y);
|
||||
|
||||
uint32_t constvec3f32(
|
||||
float x,
|
||||
float y,
|
||||
|
Loading…
x
Reference in New Issue
Block a user