mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 22:58:21 +02:00
When you use designated initializers, anything that is not explicitly
set is set to zero. When you do something like:
struct blorp_blit_prog_key {
.base = BLORP_BASE_KEY_INIT(BLORP_SHADER_TYPE_BLIT),
.base.shader_pipeline = BLORP_SHADER_PIPELINE_RENDER,
};
the second initialization is the only one that does something: it sets
shader_pipeline to the desired value, and all the other fields in
"base" are set to 0. This is easily verifiable by just examining the
contents of all the blorp keys we initialize this way: name and
shader_type are always zero.
This means that if two blorp shaders of different types have the
same key size, the shader cache could confuse them. Still, I don't
think this is happening in the real world.
Fixes:
|
||
|---|---|---|
| .. | ||
| blorp | ||
| ci | ||
| common | ||
| compiler | ||
| decoder | ||
| dev | ||
| ds | ||
| executor | ||
| genxml | ||
| isl | ||
| mda | ||
| nullhw-layer | ||
| perf | ||
| shaders | ||
| tools | ||
| vulkan | ||
| vulkan_hasvk | ||
| meson.build | ||