From 8b6dd0544e93ccd9870770bd7a0bdf7a9f47a02c Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sun, 6 Oct 2019 18:17:46 +0100 Subject: [PATCH] [spirv] Implement constvec4b32 --- src/spirv/spirv_module.cpp | 17 +++++++++++++++++ src/spirv/spirv_module.h | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/src/spirv/spirv_module.cpp b/src/spirv/spirv_module.cpp index e2579806f..44eb9431a 100644 --- a/src/spirv/spirv_module.cpp +++ b/src/spirv/spirv_module.cpp @@ -278,6 +278,23 @@ namespace dxvk { return this->constComposite(vectorTypeId, args.size(), args.data()); } + + + uint32_t SpirvModule::constvec4b32( + bool x, + bool y, + bool z, + bool w) { + std::array args = {{ + this->constBool(x), this->constBool(y), + this->constBool(z), this->constBool(w), + }}; + + uint32_t scalarTypeId = this->defBoolType(); + uint32_t vectorTypeId = this->defVectorType(scalarTypeId, 4); + + return this->constComposite(vectorTypeId, args.size(), args.data()); + } uint32_t SpirvModule::constvec4u32( diff --git a/src/spirv/spirv_module.h b/src/spirv/spirv_module.h index 7cdc59982..84ef00da2 100644 --- a/src/spirv/spirv_module.h +++ b/src/spirv/spirv_module.h @@ -139,6 +139,12 @@ namespace dxvk { int32_t y, int32_t z, int32_t w); + + uint32_t constvec4b32( + bool x, + bool y, + bool z, + bool w); uint32_t constvec4u32( uint32_t x,