From e831b951ee66f9eb3c82387c30d195e73453ad97 Mon Sep 17 00:00:00 2001 From: Sergey Yablokov Date: Thu, 11 Jul 2024 10:37:30 +0200 Subject: [PATCH] Fix incorrect resource state --- internal/RendererGPU.h | 3 +++ internal/SceneGPU.h | 1 + 2 files changed, 4 insertions(+) diff --git a/internal/RendererGPU.h b/internal/RendererGPU.h index 9655f2220..235d9065e 100644 --- a/internal/RendererGPU.h +++ b/internal/RendererGPU.h @@ -762,6 +762,9 @@ inline void Ray::NS::Renderer::TransitionSceneResources(CommandBuffer cmd_buf, c if (sc_data.cirrus_tex.ready() && sc_data.cirrus_tex.resource_state != eResState::ShaderResource) { res_transitions.emplace_back(&sc_data.cirrus_tex, eResState::ShaderResource); } + if (sc_data.curl_tex.ready() && sc_data.curl_tex.resource_state != eResState::ShaderResource) { + res_transitions.emplace_back(&sc_data.curl_tex, eResState::ShaderResource); + } if (sc_data.noise3d_tex.handle() && sc_data.noise3d_tex.resource_state != eResState::ShaderResource) { res_transitions.emplace_back(&sc_data.noise3d_tex, eResState::ShaderResource); } diff --git a/internal/SceneGPU.h b/internal/SceneGPU.h index 63081872f..e484f02c7 100644 --- a/internal/SceneGPU.h +++ b/internal/SceneGPU.h @@ -1633,6 +1633,7 @@ inline std::vector Ray::NS::Scene::CalcSkyEnvTexture(const a {&sky_moon_tex_, eResState::ShaderResource}, {&sky_weather_tex_, eResState::ShaderResource}, {&sky_cirrus_tex_, eResState::ShaderResource}, + {&sky_curl_tex_, eResState::ShaderResource}, {&sky_noise3d_tex_, eResState::ShaderResource}, {&temp_img, eResState::UnorderedAccess}}; TransitionResourceStates(cmd_buf, AllStages, AllStages, res_transitions);