diff --git a/servers/rendering/renderer_rd/effects/tone_mapper.cpp b/servers/rendering/renderer_rd/effects/tone_mapper.cpp index 5d8f11ceea0..88631398aaf 100644 --- a/servers/rendering/renderer_rd/effects/tone_mapper.cpp +++ b/servers/rendering/renderer_rd/effects/tone_mapper.cpp @@ -324,7 +324,7 @@ void ToneMapper::tonemapper_subpass(RD::DrawListID p_subpass_draw_list, RID p_so tonemap_mobile.push_constant.white = p_settings.white; tonemap_mobile.push_constant.luminance_multiplier = p_settings.luminance_multiplier; - uint32_t spec_constant = 0; + uint32_t spec_constant = TONEMAP_MOBILE_ADRENO_BUG; spec_constant |= p_settings.use_bcs ? TONEMAP_MOBILE_FLAG_USE_BCS : 0; //spec_constant |= p_settings.use_glow ? TONEMAP_MOBILE_FLAG_USE_GLOW : 0; //spec_constant |= p_settings.glow_map_strength > 0.01 ? TONEMAP_MOBILE_FLAG_USE_GLOW_MAP : 0; diff --git a/servers/rendering/renderer_rd/effects/tone_mapper.h b/servers/rendering/renderer_rd/effects/tone_mapper.h index bc73c4e7dd7..e0af8a12897 100644 --- a/servers/rendering/renderer_rd/effects/tone_mapper.h +++ b/servers/rendering/renderer_rd/effects/tone_mapper.h @@ -100,6 +100,7 @@ private: TONEMAP_MOBILE_FLAG_GLOW_MODE_SOFTLIGHT = (1 << 15), TONEMAP_MOBILE_FLAG_GLOW_MODE_REPLACE = (1 << 16), TONEMAP_MOBILE_FLAG_GLOW_MODE_MIX = (1 << 17), + TONEMAP_MOBILE_ADRENO_BUG = (1 << 18), // Needs to be last so we force the pipeline cache to specify specializations for all variants. }; struct TonemapPushConstant { diff --git a/servers/rendering/renderer_rd/pipeline_cache_rd.cpp b/servers/rendering/renderer_rd/pipeline_cache_rd.cpp index ad630e09ec9..90a026896bc 100644 --- a/servers/rendering/renderer_rd/pipeline_cache_rd.cpp +++ b/servers/rendering/renderer_rd/pipeline_cache_rd.cpp @@ -46,14 +46,12 @@ RID PipelineCacheRD::_generate_version(RD::VertexFormatID p_vertex_format_id, RD uint32_t bool_index = 0; uint32_t bool_specializations = p_bool_specializations; while (bool_specializations) { - if (bool_specializations & (1 << bool_index)) { - RD::PipelineSpecializationConstant sc; - sc.bool_value = true; - sc.constant_id = bool_index; - sc.type = RD::PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL; - specialization_constants.push_back(sc); - bool_specializations &= ~(1 << bool_index); - } + RD::PipelineSpecializationConstant sc; + sc.bool_value = bool(bool_specializations & (1 << bool_index)); + sc.constant_id = bool_index; + sc.type = RD::PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL; + specialization_constants.push_back(sc); + bool_specializations &= ~(1 << bool_index); bool_index++; }