File tree Expand file tree Collapse file tree
servers/rendering/renderer_rd/storage_rd Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4596,7 +4596,10 @@ uint32_t TextureStorage::render_target_get_color_usage_bits(bool p_msaa) {
45964596 if (p_msaa) {
45974597 return RD ::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT ;
45984598 } else {
4599- // FIXME: Storage bit should only be requested when FSR is required.
4600- return RD ::TEXTURE_USAGE_SAMPLING_BIT | RD ::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD ::TEXTURE_USAGE_CAN_COPY_FROM_BIT | RD ::TEXTURE_USAGE_STORAGE_BIT ;
4599+ uint32_t usage_bits = RD ::TEXTURE_USAGE_SAMPLING_BIT | RD ::TEXTURE_USAGE_COLOR_ATTACHMENT_BIT | RD ::TEXTURE_USAGE_CAN_COPY_FROM_BIT ;
4600+ if (RendererSceneRenderRD::get_singleton ()->_render_buffers_can_be_storage ()) {
4601+ usage_bits |= RD ::TEXTURE_USAGE_STORAGE_BIT ;
4602+ }
4603+ return usage_bits;
46014604 }
46024605}
You can’t perform that action at this time.
0 commit comments