From 95a7fd0f1091dcd265fba12d34b78038d808be36 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Mon, 1 Jul 2019 12:17:39 +0200 Subject: nouveau: handle new CAPS Signed-off-by: Karol Herbst Reviewed-by: Ilia Mirkin --- src/gallium/drivers/nouveau/nv50/nv50_screen.c | 13 +++++++++++++ src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 13 +++++++++++++ 2 files changed, 26 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 3db1f38c9e4..3169b1e08cb 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -320,6 +320,13 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_NIR_COMPACT_ARRAYS: case PIPE_CAP_COMPUTE: case PIPE_CAP_IMAGE_LOAD_FORMATTED: + case PIPE_CAP_COMPUTE_SHADER_DERIVATIVES: + case PIPE_CAP_ATOMIC_FLOAT_MINMAX: + case PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE: + case PIPE_CAP_FRAGMENT_SHADER_INTERLOCK: + case PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED: + case PIPE_CAP_FBFETCH_COHERENT: + case PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS: return 0; case PIPE_CAP_VENDOR_ID: @@ -338,8 +345,14 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return dev->vram_size >> 20; case PIPE_CAP_UMA: return 0; + default: debug_printf("%s: unhandled cap %d\n", __func__, param); + /* fallthrough */ + /* caps where we want the default value */ + case PIPE_CAP_DMABUF: + case PIPE_CAP_ESSL_FEATURE_LEVEL: + case PIPE_CAP_MAX_FRAMES_IN_FLIGHT: return u_pipe_screen_get_param_defaults(pscreen, param); } } diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 3a543e54d1f..bf883631b86 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -355,6 +355,13 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS: case PIPE_CAP_NIR_COMPACT_ARRAYS: case PIPE_CAP_IMAGE_LOAD_FORMATTED: + case PIPE_CAP_COMPUTE_SHADER_DERIVATIVES: + case PIPE_CAP_ATOMIC_FLOAT_MINMAX: + case PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE: + case PIPE_CAP_FRAGMENT_SHADER_INTERLOCK: + case PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED: + case PIPE_CAP_FBFETCH_COHERENT: + case PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS: return 0; case PIPE_CAP_VENDOR_ID: @@ -373,8 +380,14 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return dev->vram_size >> 20; case PIPE_CAP_UMA: return 0; + default: debug_printf("%s: unhandled cap %d\n", __func__, param); + /* fallthrough */ + /* caps where we want the default value */ + case PIPE_CAP_DMABUF: + case PIPE_CAP_ESSL_FEATURE_LEVEL: + case PIPE_CAP_MAX_FRAMES_IN_FLIGHT: return u_pipe_screen_get_param_defaults(pscreen, param); } } -- cgit v1.2.3