mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
zink: do not report texture-samplers for unsupported stages
This caused the max combined samplers to be reported as artificially high. Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3826>
This commit is contained in:
parent
4a20db70de
commit
b7e966dc7f
1 changed files with 9 additions and 3 deletions
|
|
@ -386,9 +386,15 @@ zink_get_shader_param(struct pipe_screen *pscreen,
|
|||
}
|
||||
|
||||
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
|
||||
/* this might be a bit simplistic... */
|
||||
return MIN2(screen->props.limits.maxPerStageDescriptorSamplers,
|
||||
PIPE_MAX_SAMPLERS);
|
||||
switch (shader) {
|
||||
case PIPE_SHADER_VERTEX:
|
||||
case PIPE_SHADER_FRAGMENT:
|
||||
/* this might be a bit simplistic... */
|
||||
return MIN2(screen->props.limits.maxPerStageDescriptorSamplers,
|
||||
PIPE_MAX_SAMPLERS);
|
||||
default:
|
||||
return 0; /* unsupported stage */
|
||||
}
|
||||
|
||||
case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE:
|
||||
return MIN2(screen->props.limits.maxUniformBufferRange, INT_MAX);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue