379ae6d823
create_vertex_elements_state is sometimes called with a too large
num_elements argument, for example with util_blitter, which causes a
buffer overflow.
There is no documentation to forbid this practice, so don't rely on
so->num_elements being correct and instead use the vertex shader
attribute count, which matches the value used to allocate the
descriptors.
Use attributes_read_count rather than attribute_count because the
latter also includes images and PAN_VERTEX_ID/PAN_INSTANCE_ID.
Fixes:
|
||
---|---|---|
.. | ||
lcra.c | ||
lcra.h | ||
meson.build | ||
nir_mod_helpers.c | ||
pan_ir.c | ||
pan_ir.h | ||
pan_liveness.c | ||
pan_lower_64bit_intrin.c | ||
pan_lower_framebuffer.c | ||
pan_lower_framebuffer.h | ||
pan_lower_helper_invocation.c | ||
pan_lower_sample_position.c | ||
pan_lower_writeout.c | ||
pan_sysval.c |