Fix incorrect mapping of initial action as clear region continue to clear.

This commit is contained in:
Dario 2024-01-09 20:00:00 -03:00
parent 9b522ac1a8
commit 80eacf1b7a
5 changed files with 5 additions and 6 deletions

View file

@ -2170,7 +2170,7 @@
<constant name="INITIAL_ACTION_CLEAR_REGION" value="1" enum="InitialAction" is_deprecated="true">
[i]Deprecated.[/i] Use [constant INITIAL_ACTION_CLEAR] instead.
</constant>
<constant name="INITIAL_ACTION_CLEAR_REGION_CONTINUE" value="0" enum="InitialAction" is_deprecated="true">
<constant name="INITIAL_ACTION_CLEAR_REGION_CONTINUE" value="1" enum="InitialAction" is_deprecated="true">
[i]Deprecated.[/i] Use [constant INITIAL_ACTION_LOAD] instead.
</constant>
<constant name="INITIAL_ACTION_KEEP" value="0" enum="InitialAction" is_deprecated="true">

View file

@ -35,7 +35,7 @@ GH-84976
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/FinalAction/values/FINAL_ACTION_CONTINUE': value changed value in new API, from 2.0 to 0.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/FinalAction/values/FINAL_ACTION_MAX': value changed value in new API, from 3.0 to 2.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/InitialAction/values/INITIAL_ACTION_CLEAR': value changed value in new API, from 0.0 to 1.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/InitialAction/values/INITIAL_ACTION_CLEAR_REGION_CONTINUE': value changed value in new API, from 2.0 to 0.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/InitialAction/values/INITIAL_ACTION_CLEAR_REGION_CONTINUE': value changed value in new API, from 2.0 to 1.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/InitialAction/values/INITIAL_ACTION_CONTINUE': value changed value in new API, from 5.0 to 0.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/InitialAction/values/INITIAL_ACTION_DROP': value changed value in new API, from 4.0 to 2.
Validate extension JSON: Error: Field 'classes/RenderingDevice/enums/InitialAction/values/INITIAL_ACTION_KEEP': value changed value in new API, from 3.0 to 0.

View file

@ -1721,8 +1721,7 @@ void RendererCanvasRenderRD::light_update_shadow(RID p_rid, int p_shadow_index,
//light.basis.scale(Vector3(to_light.elements[0].length(),to_light.elements[1].length(),1));
Rect2i rect((state.shadow_texture_size / 4) * i, p_shadow_index * 2, (state.shadow_texture_size / 4), 2);
RD::InitialAction initial_action = i == 0 ? RD::INITIAL_ACTION_CLEAR : RD::INITIAL_ACTION_LOAD;
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(state.shadow_fb, initial_action, RD::FINAL_ACTION_STORE, initial_action, RD::FINAL_ACTION_DISCARD, cc, 1.0, 0, rect);
RD::DrawListID draw_list = RD::get_singleton()->draw_list_begin(state.shadow_fb, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_STORE, RD::INITIAL_ACTION_CLEAR, RD::FINAL_ACTION_DISCARD, cc, 1.0, 0, rect);
Projection projection;
{

View file

@ -59,8 +59,8 @@ RenderingDevice::InitialAction RenderingDevice::_convert_initial_action_84976(In
case 0: // INITIAL_ACTION_CLEAR
return INITIAL_ACTION_CLEAR;
case 1: // INITIAL_ACTION_CLEAR_REGION
return INITIAL_ACTION_CLEAR;
case 2: // INITIAL_ACTION_CLEAR_REGION_CONTINUE
return INITIAL_ACTION_CLEAR;
case 3: // INITIAL_ACTION_KEEP
return INITIAL_ACTION_LOAD;
case 4: // INITIAL_ACTION_DROP

View file

@ -335,7 +335,7 @@ public:
INITIAL_ACTION_MAX,
#ifndef DISABLE_DEPRECATED
INITIAL_ACTION_CLEAR_REGION = INITIAL_ACTION_CLEAR,
INITIAL_ACTION_CLEAR_REGION_CONTINUE = INITIAL_ACTION_LOAD,
INITIAL_ACTION_CLEAR_REGION_CONTINUE = INITIAL_ACTION_CLEAR,
INITIAL_ACTION_KEEP = INITIAL_ACTION_LOAD,
INITIAL_ACTION_DROP = INITIAL_ACTION_DISCARD,
INITIAL_ACTION_CONTINUE = INITIAL_ACTION_LOAD,