diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-08-11 00:27:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-11 00:27:42 +0200 |
commit | 4a2d16af6f43d942313a7c3d3d0d11c38935d079 (patch) | |
tree | 491db56179e967538055a838a991432c3d59709d /servers | |
parent | 11abffbf1282d457f966741f14aa5a5793f3c208 (diff) | |
parent | 7c848ee591459fee9f6d916904339cdb493d265d (diff) |
Merge pull request #64237 from clayjohn/VRS-texture-create
Detect if VRS is supported when creating textures
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/texture_storage.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp index e20a04ff2a..84427e1c93 100644 --- a/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp @@ -416,7 +416,10 @@ TextureStorage::TextureStorage() { tformat.format = RD::DATA_FORMAT_R8_UINT; tformat.width = 4; tformat.height = 4; - tformat.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_VRS_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; + tformat.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT | RD::TEXTURE_USAGE_CAN_UPDATE_BIT; + if (RD::get_singleton()->has_feature(RD::SUPPORTS_ATTACHMENT_VRS)) { + tformat.usage_bits |= RD::TEXTURE_USAGE_VRS_ATTACHMENT_BIT; + } tformat.texture_type = RD::TEXTURE_TYPE_2D; Vector<uint8_t> pv; |