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>
}
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);