diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-26 01:12:12 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-26 01:12:12 +0100 |
commit | bc73e320148c5474cd8d03a94716526a743b5147 (patch) | |
tree | 42809181f2a55f41da89eeca4bfbfe677dbb748f /servers | |
parent | f902bff9a5f9c18c66cf6f17a786f7bf54fdb0a4 (diff) | |
parent | 5f94b378ab9f7806a6a40c94561b1a8dd1de9e4e (diff) |
Merge pull request #72068 from clayjohn/RD-sky-texture
Validate another case of using DATA_FORMAT_A2B10G10R10_UNORM_PACK32 texture with storage flag
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering/renderer_rd/environment/sky.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/environment/sky.cpp b/servers/rendering/renderer_rd/environment/sky.cpp index 1dbad79477..814d145b66 100644 --- a/servers/rendering/renderer_rd/environment/sky.cpp +++ b/servers/rendering/renderer_rd/environment/sky.cpp @@ -1648,7 +1648,10 @@ void SkyRD::update_dirty_skys() { tf.mipmaps = MIN(mipmaps, layers); tf.width = w; tf.height = h; - tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT | RD::TEXTURE_USAGE_STORAGE_BIT; + tf.usage_bits = RD::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD::TEXTURE_USAGE_SAMPLING_BIT; + if (RendererSceneRenderRD::get_singleton()->_render_buffers_can_be_storage()) { + tf.usage_bits |= RD::TEXTURE_USAGE_STORAGE_BIT; + } sky->radiance = RD::get_singleton()->texture_create(tf, RD::TextureView()); |