Skip to content

Commit

Permalink
Detect if VRS supported before creating default VRS texture
Browse files Browse the repository at this point in the history
  • Loading branch information
clayjohn committed Aug 10, 2022
1 parent 11abffb commit 7c848ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion servers/rendering/renderer_rd/storage_rd/texture_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7c848ee

Please sign in to comment.