virtualx-engine/servers/rendering
Matias N. Goldberg 472226422e Fix uninitialized variable ending up sent to Vulkan
The first time a shader is compiled Godot performs the following:

```cpp
for (uint32_t i = 0; i < SHADER_STAGE_MAX; i++) {
	if
(spirv_data.push_constant_stages_mask.has_flag((ShaderStage)(1 << i))) {
		binary_data.push_constant_vk_stages_mask |=
shader_stage_masks[i];
	}
}
```

However binary_data.push_constant_vk_stages_mask is never initialized to
0 and thus contains garbage data or'ed with the good data.

This value is used by push constants (and many other things) thus it can
be a big deal.

Fortunately because the relevant flags are always guaranteed to be set
(but not guaranteed to be unset), the damage is restricted to:

1. Performance (unnecessary flushing & over-excessive barriers)
2. Overwriting push descriptors already set (this would be serious,
doesn't seem to be an issue)
3. Driver implementations going crazy when they see bits set they don't
expect (unknown if this is an issue)

This uninitialized value is later saved into the binary cache.

Valgrind is able to detect this bug on the first run, but not on the
subsequent ones because they data comes from a file.

cache_file_version has been bumped to force rebuild of all cached
shaders. Because the ones generated so far are compromised.
2023-07-29 18:28:33 -03:00
..
dummy Add custom texture create function 2023-07-26 20:46:34 +10:00
environment Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D 2023-01-31 20:04:11 +01:00
renderer_rd Fix uninitialized variable ending up sent to Vulkan 2023-07-29 18:28:33 -03:00
storage Merge pull request #79142 from BastiaanOlij/register_render_buffers 2023-07-27 15:22:27 +02:00
renderer_canvas_cull.cpp Fix Y-sort modulate for top-most Y-sorted CanvasItem 2023-06-12 13:33:26 +02:00
renderer_canvas_cull.h Single Compilation Unit build. 2023-06-06 15:36:51 +01:00
renderer_canvas_render.cpp
renderer_canvas_render.h Fixes a canvas item set to clip children being drawn as black if no children are visible 2023-03-07 09:53:26 +02:00
renderer_compositor.cpp Forbid passing multiview sampler to the custom function in shaders 2023-02-21 11:23:17 +03:00
renderer_compositor.h Forbid passing multiview sampler to the custom function in shaders 2023-02-21 11:23:17 +03:00
renderer_geometry_instance.cpp
renderer_geometry_instance.h Expose RD::texture_native_handle 2023-06-14 09:58:08 +10:00
renderer_scene_cull.cpp Fix instance uniform data buffer update delay 2023-07-18 12:19:15 +03:00
renderer_scene_cull.h Properly clear material slots on mesh instance when material is freed 2023-05-22 23:00:00 +10:00
renderer_scene_occlusion_cull.cpp
renderer_scene_occlusion_cull.h
renderer_scene_render.cpp
renderer_scene_render.h
renderer_viewport.cpp Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
renderer_viewport.h Add RENDERING_INFO parameters to GL Compatibility renderer 2023-06-16 09:10:00 +02:00
rendering_device.cpp Add custom texture create function 2023-07-26 20:46:34 +10:00
rendering_device.h Add custom texture create function 2023-07-26 20:46:34 +10:00
rendering_device_binds.cpp
rendering_device_binds.h Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
rendering_method.cpp
rendering_method.h
rendering_server_default.cpp Fix crash when calling get_video_adapter_* in a thread 2023-07-19 23:31:27 +09:00
rendering_server_default.h Add custom texture create function 2023-07-26 20:46:34 +10:00
rendering_server_globals.cpp
rendering_server_globals.h
SCsub
shader_compiler.cpp Merge pull request #77740 from ChibiDenDen/simplify_vulkan 2023-07-12 17:16:12 +02:00
shader_compiler.h replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +03:00
shader_language.cpp Merge pull request #79459 from MoltenCoffee/fix-shader-arguments-error 2023-07-24 19:32:46 +02:00
shader_language.h Enable shadow warnings and fix raised errors 2023-05-11 16:00:59 +02:00
shader_preprocessor.cpp i18n: Sync translations with Weblate (now tracking 4.1 strings) 2023-06-12 14:57:08 +02:00
shader_preprocessor.h Fix Shader Preprocessor line numbering when disabled 2023-04-26 16:48:23 +03:00
shader_types.cpp Merge pull request #76565 from clayjohn/debug-PSSM-splits 2023-05-15 09:33:01 +02:00
shader_types.h
shader_warnings.cpp
shader_warnings.h