[spirv] Implement constvec3f32

This commit is contained in:
Joshua Ashton 2019-04-12 00:00:10 +01:00 committed by Philip Rebohle
parent a770c73dbc
commit 0c34fae9c7
2 changed files with 22 additions and 1 deletions

View File

@ -296,6 +296,22 @@ namespace dxvk {
return this->constComposite(vectorTypeId, args.size(), args.data());
}
uint32_t SpirvModule::constvec3f32(
float x,
float y,
float z) {
std::array<uint32_t, 3> args = {{
this->constf32(x), this->constf32(y),
this->constf32(z),
}};
uint32_t scalarTypeId = this->defFloatType(32);
uint32_t vectorTypeId = this->defVectorType(scalarTypeId, 3);
return this->constComposite(vectorTypeId, args.size(), args.data());
}
uint32_t SpirvModule::constvec4f32(
float x,

View File

@ -143,7 +143,12 @@ namespace dxvk {
uint32_t y,
uint32_t z,
uint32_t w);
uint32_t constvec3f32(
float x,
float y,
float z);
uint32_t constvec4f32(
float x,
float y,