r600: report incorrect max-vertex-attrib for GL 4.4
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Fri, 6 Jul 2018 08:29:02 +0000 (10:29 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Mon, 9 Jul 2018 15:32:31 +0000 (17:32 +0200)
OpenGL 4.4 requires a max vertex attrib of 2048 or higher, but
r600 only supports 2047. Technically, this makes it an GL4.3 GPU,
but it's currently exposing GL4.4.

To avoid regressing the GL version supported in the following
patches, let's just lie and pretend like we support 2048. Any
applications using 2048 are already broken anyway.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/gallium/drivers/r600/r600_pipe.c

index bc5660d6d1127fad88c3b35a8d4412d969b21163..25180321455d35121aaec7e862c4260d2ce8f733 100644 (file)
@@ -470,7 +470,8 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
                return family >= CHIP_CEDAR ? 4 : 1;
 
        case PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE:
-               return 2047;
+               /* Should be 2047, but 2048 is a requirement for GL 4.4 */
+               return 2048;
 
        /* Texturing. */
        case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: