mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-03 21:58:26 +02:00
st/mesa: Zero MaxTextureImageUnits for unsupported stages
Mesa core pre-seeds VS/TCS/TES/GS/FS in _mesa_init_constants(..) with MAX_TEXTURE_IMAGE_UNITS. When a driver does not expose a stage, this seed leaks into the GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS sum. Drivers that only expose VS+FS (like etnaviv) overcounted by 96. Zero the field so the sum reflects only the stages the driver advertises. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Marek Olšák <maraeo@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41746>
This commit is contained in:
parent
165a0105d3
commit
adad1a7318
1 changed files with 3 additions and 1 deletions
|
|
@ -206,8 +206,10 @@ void st_init_limits(struct pipe_screen *screen,
|
|||
for (sh = 0; sh < MESA_SHADER_MESH_STAGES; ++sh) {
|
||||
struct gl_program_constants *pc = &c->Program[sh];
|
||||
|
||||
if (!screen->shader_caps[sh].max_instructions)
|
||||
if (!screen->shader_caps[sh].max_instructions) {
|
||||
pc->MaxTextureImageUnits = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
pc->MaxTextureImageUnits =
|
||||
_min(screen->shader_caps[sh].max_texture_samplers,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue