virtualx-engine/drivers
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
..
alsa Fix wait for thread not started 2023-04-27 20:28:22 +02:00
alsamidi Fix wait for thread not started 2023-04-27 20:28:22 +02:00
coreaudio Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
coremidi Style: Harmonize header includes in platform ports 2023-06-08 15:19:19 +02:00
gl_context Enable shadow warnings and fix raised errors 2023-05-11 16:00:59 +02:00
gles3 Merge pull request #79142 from BastiaanOlij/register_render_buffers 2023-07-27 15:22:27 +02:00
png Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
pulseaudio Enable shadow warnings and fix raised errors 2023-05-11 16:00:59 +02:00
unix Fix file permissions for the web platform 2023-07-25 08:29:24 -04:00
vulkan Fix uninitialized variable ending up sent to Vulkan 2023-07-29 18:28:33 -03:00
wasapi Add mono audio support to WASAPI 2023-04-28 13:29:43 +02:00
windows Support long path in file access on windows 2023-05-05 10:04:39 +02:00
winmidi One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
xaudio2 Fix wait for thread not started 2023-04-27 20:28:22 +02:00
register_driver_types.cpp One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
register_driver_types.h One Copyright Update to rule them all 2023-01-05 13:25:55 +01:00
SCsub Refactor SPIR-V reflection into a generic RenderingDevice feature 2022-12-12 14:14:53 +01:00