virtualx-engine/servers/rendering/renderer_rd
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
..
effects Split raster barrier into vertex and fragment barrier 2023-07-15 12:30:32 +10:00
environment Use defaults to initialize sky data in case of no sky 2023-07-24 10:41:13 -07:00
forward_clustered Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
forward_mobile Expose RenderingSceneBuffers through ClassDB 2023-07-26 23:48:30 +10:00
shaders Fix use of discard in shaders 2023-07-24 23:21:04 +02:00
spirv-reflect Refactor SPIR-V reflection into a generic RenderingDevice feature 2022-12-12 14:14:53 +01:00
storage_rd Merge pull request #79142 from BastiaanOlij/register_render_buffers 2023-07-27 15:22:27 +02:00
cluster_builder_rd.cpp Save cluster render shader from being optimized out entirely 2023-05-08 18:39:49 +02:00
cluster_builder_rd.h Replace Extents with Size in VoxelGI, ReflectionProbe, FogVolume, Decal and GPUParticles*3D 2023-01-31 20:04:11 +01:00
framebuffer_cache_rd.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
framebuffer_cache_rd.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
pipeline_cache_rd.cpp Properly handle wireframe mode in RendererRD pipeline cache 2023-06-14 09:14:34 +02:00
pipeline_cache_rd.h Properly handle wireframe mode in RendererRD pipeline cache 2023-06-14 09:14:34 +02:00
renderer_canvas_render_rd.cpp Merge pull request #77740 from ChibiDenDen/simplify_vulkan 2023-07-12 17:16:12 +02:00
renderer_canvas_render_rd.h replace sampler arrays with constant sampler elements 2023-06-22 01:11:57 +03:00
renderer_compositor_rd.cpp Move roughness limiter and sort into their own classes 2023-03-09 21:58:55 +11:00
renderer_compositor_rd.h Move roughness limiter and sort into their own classes 2023-03-09 21:58:55 +11:00
renderer_scene_render_rd.cpp Draw frustum splices ontop of direction shadow atlas for debug purposes 2023-06-11 11:48:11 +10:00
renderer_scene_render_rd.h Draw frustum splices ontop of direction shadow atlas for debug purposes 2023-06-11 11:48:11 +10:00
SCsub Refactor SPIR-V reflection into a generic RenderingDevice feature 2022-12-12 14:14:53 +01:00
shader_rd.cpp Fix uninitialized variable ending up sent to Vulkan 2023-07-29 18:28:33 -03:00
shader_rd.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
uniform_set_cache_rd.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
uniform_set_cache_rd.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00