From e40f32d5626c87d9e77bbc261df3648cd54bd066 Mon Sep 17 00:00:00 2001 From: Ilia Mirkin Date: Sun, 6 Sep 2015 11:29:00 -0400 Subject: [PATCH] st/mesa: don't fall back to 16F when 32F is requested MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Nothing in the spec allows for the reduced precision, and this also fixes st_QuerySamplesForFormat for nv50, which does not allow MS8 on RGBA32F. Now this will be respected instead of reporting MS8 as supported with an assumption that the format used will be RGBA16F. Signed-off-by: Ilia Mirkin Cc: "10.6 11.0" Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_format.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c index db74184cff4..e3fb761aa98 100644 --- a/src/mesa/state_tracker/st_format.c +++ b/src/mesa/state_tracker/st_format.c @@ -1270,46 +1270,40 @@ static const struct format_mapping format_map[] = { /* 32-bit float formats */ { { GL_RGBA32F_ARB, 0 }, - { PIPE_FORMAT_R32G32B32A32_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + { PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_RGB32F_ARB, 0 }, { PIPE_FORMAT_R32G32B32_FLOAT, PIPE_FORMAT_R32G32B32X32_FLOAT, - PIPE_FORMAT_R32G32B32A32_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_LUMINANCE_ALPHA32F_ARB, 0 }, - { PIPE_FORMAT_L32A32_FLOAT, PIPE_FORMAT_R32G32B32A32_FLOAT, - PIPE_FORMAT_L16A16_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + { PIPE_FORMAT_L32A32_FLOAT, PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_ALPHA32F_ARB, 0 }, { PIPE_FORMAT_A32_FLOAT, PIPE_FORMAT_L32A32_FLOAT, - PIPE_FORMAT_R32G32B32A32_FLOAT, PIPE_FORMAT_A16_FLOAT, - PIPE_FORMAT_L16A16_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_INTENSITY32F_ARB, 0 }, { PIPE_FORMAT_I32_FLOAT, PIPE_FORMAT_L32A32_FLOAT, - PIPE_FORMAT_R32G32B32A32_FLOAT, PIPE_FORMAT_I16_FLOAT, - PIPE_FORMAT_L16A16_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_LUMINANCE32F_ARB, 0 }, { PIPE_FORMAT_L32_FLOAT, PIPE_FORMAT_L32A32_FLOAT, - PIPE_FORMAT_R32G32B32A32_FLOAT, PIPE_FORMAT_L16_FLOAT, - PIPE_FORMAT_L16A16_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_R32F, 0 }, { PIPE_FORMAT_R32_FLOAT, PIPE_FORMAT_R32G32_FLOAT, - PIPE_FORMAT_R32G32B32A32_FLOAT, PIPE_FORMAT_R16_FLOAT, - PIPE_FORMAT_R16G16_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, { { GL_RG32F, 0 }, - { PIPE_FORMAT_R32G32_FLOAT, PIPE_FORMAT_R32G32B32A32_FLOAT, - PIPE_FORMAT_R16G16_FLOAT, PIPE_FORMAT_R16G16B16A16_FLOAT, 0 } + { PIPE_FORMAT_R32G32_FLOAT, PIPE_FORMAT_R32G32B32A32_FLOAT, 0 } }, /* R, RG formats */ -- 2.30.2