diff options
author | Ilia Mirkin <[email protected]> | 2016-06-29 00:11:57 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2016-07-01 23:01:03 -0400 |
commit | 6f4d35212b9566125cee4c2b749f8baa2a6fc031 (patch) | |
tree | 6f31416f27fb9d13b0e45387a74d5c637b5b7021 | |
parent | b2b5075e04bbe6c6462fd01711524abd80380f45 (diff) |
st/mesa: get max supported number of image samples from driver
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 412f598ca62..c5ecd5a2dd7 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -443,7 +443,6 @@ void st_init_limits(struct pipe_screen *screen, c->Program[MESA_SHADER_COMPUTE].MaxImageUniforms; c->MaxCombinedShaderOutputResources += c->MaxCombinedImageUniforms; c->MaxImageUnits = MAX_IMAGE_UNITS; - c->MaxImageSamples = 0; /* XXX */ if (c->MaxCombinedImageUniforms) { extensions->ARB_shader_image_load_store = GL_TRUE; extensions->ARB_shader_image_size = GL_TRUE; @@ -988,6 +987,11 @@ void st_init_extensions(struct pipe_screen *screen, color_formats, 16, PIPE_BIND_RENDER_TARGET); + consts->MaxImageSamples = + get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats), + color_formats, 16, + PIPE_BIND_SHADER_IMAGE); + consts->MaxColorTextureSamples = get_max_samples_for_formats(screen, ARRAY_SIZE(color_formats), color_formats, consts->MaxSamples, |