etnaviv: check if MSAA is supported
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Wed, 1 Jan 2020 21:36:10 +0000 (22:36 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Fri, 3 Jan 2020 07:31:02 +0000 (08:31 +0100)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Jonathan Marek <jonathan@marek.ca>
src/gallium/drivers/etnaviv/etnaviv_screen.c

index e847d26aa7f8b6fc43dfcce03c78ac67a9e48b2b..9d3fee86fbeb30a27bf6dc76705161de81bb45c4 100644 (file)
@@ -434,6 +434,8 @@ gpu_supports_render_format(struct etna_screen *screen, enum pipe_format format,
    /* Validate MSAA; number of samples must be allowed, and render target
     * must have MSAA'able format. */
    if (sample_count > 1) {
+      if (!VIV_FEATURE(screen, chipFeatures, MSAA))
+         return false;
       if (!translate_samples_to_xyscale(sample_count, NULL, NULL))
          return false;
       if (translate_ts_format(format) == ETNA_NO_MATCH)