Ilia Mirkin
2014-Jun-17 03:16 UTC
[Nouveau] [PATCH 1/3] nvc0: remove vport_int hack and instead use the usual state validation
Commit ad4dc772 fixed an issue with the viewport not being restored correctly. However it's rather hackish and confusing. Instead just mark the viewport dirty and let the viewport validation take care of it. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 1 - src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 5 ----- src/gallium/drivers/nouveau/nvc0/nvc0_surface.c | 8 +++----- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h index 41cee78..052f0ba 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_context.h +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_context.h @@ -202,7 +202,6 @@ struct nvc0_context { struct pipe_surface *surfaces[2][NVC0_MAX_SURFACE_SLOTS]; uint16_t surfaces_dirty[2]; uint16_t surfaces_valid[2]; - uint32_t vport_int[2]; struct util_dynarray global_residents; diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c index 0cc7a52..25a3232 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c @@ -299,11 +299,6 @@ nvc0_validate_viewport(struct nvc0_context *nvc0) PUSH_DATA (push, (w << 16) | x); PUSH_DATA (push, (h << 16) | y); - if (i == 0) { - nvc0->vport_int[0] = (w << 16) | x; - nvc0->vport_int[1] = (h << 16) | y; - } - zmin = vp->translate[2] - fabsf(vp->scale[2]); zmax = vp->translate[2] + fabsf(vp->scale[2]); diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c index f782eec..a29f0cc 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_surface.c @@ -1012,11 +1012,13 @@ nvc0_blitctx_post_blit(struct nvc0_blitctx *blit) nvc0->dirty = blit->saved.dirty | (NVC0_NEW_FRAMEBUFFER | NVC0_NEW_SCISSOR | NVC0_NEW_SAMPLE_MASK | NVC0_NEW_RASTERIZER | NVC0_NEW_ZSA | NVC0_NEW_BLEND | + NVC0_NEW_VIEWPORT | NVC0_NEW_TEXTURES | NVC0_NEW_SAMPLERS | NVC0_NEW_VERTPROG | NVC0_NEW_FRAGPROG | NVC0_NEW_TCTLPROG | NVC0_NEW_TEVLPROG | NVC0_NEW_GMTYPROG | NVC0_NEW_TFB_TARGETS | NVC0_NEW_VERTEX | NVC0_NEW_ARRAYS); nvc0->scissors_dirty |= 1; + nvc0->viewports_dirty |= 1; nvc0->base.pipe.set_min_samples(&nvc0->base.pipe, blit->saved.min_samples); } @@ -1188,11 +1190,7 @@ nvc0_blit_3d(struct nvc0_context *nvc0, const struct pipe_blit_info *info) nvc0_blitctx_post_blit(blit); - /* restore viewport */ - - BEGIN_NVC0(push, NVC0_3D(VIEWPORT_HORIZ(0)), 2); - PUSH_DATA (push, nvc0->vport_int[0]); - PUSH_DATA (push, nvc0->vport_int[1]); + /* restore viewport transform */ IMMED_NVC0(push, NVC0_3D(VIEWPORT_TRANSFORM_EN), 1); } -- 1.8.5.5
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 112 +++++++++++-------------- 1 file changed, 51 insertions(+), 61 deletions(-) diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c index 3fdb6ae..52a067e 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c @@ -71,6 +71,7 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) const uint16_t class_3d = nouveau_screen(pscreen)->class_3d; switch (param) { + /* non-boolean caps */ case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS: return 15; @@ -86,6 +87,38 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) return -32; case PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET: return 31; + case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE: + return 65536; + case PIPE_CAP_GLSL_FEATURE_LEVEL: + return 330; + case PIPE_CAP_MAX_RENDER_TARGETS: + return 8; + case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: + return 1; + case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: + return 4; + case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS: + case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS: + return 128; + case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES: + case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: + return 1024; + case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT: + return 256; + case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: + return 1; /* 256 for binding as RT, but that's not possible in GL */ + case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: + return NOUVEAU_MIN_BUFFER_MAP_ALIGN; + case PIPE_CAP_MAX_VIEWPORTS: + return NVC0_MAX_VIEWPORTS; + case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: + return 4; + case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: + return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50; + case PIPE_CAP_ENDIANNESS: + return PIPE_ENDIAN_LITTLE; + + /* supported caps */ case PIPE_CAP_TEXTURE_MIRROR_CLAMP: case PIPE_CAP_TEXTURE_SWIZZLE: case PIPE_CAP_TEXTURE_SHADOW_MAP: @@ -96,54 +129,24 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_CUBE_MAP_ARRAY: case PIPE_CAP_TEXTURE_BUFFER_OBJECTS: case PIPE_CAP_TEXTURE_MULTISAMPLE: - return 1; - case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE: - return 65536; - case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: - return (class_3d >= NVE4_3D_CLASS) ? 1 : 0; case PIPE_CAP_TWO_SIDED_STENCIL: case PIPE_CAP_DEPTH_CLIP_DISABLE: case PIPE_CAP_POINT_SPRITE: case PIPE_CAP_TGSI_TEXCOORD: - return 1; case PIPE_CAP_SM3: - return 1; - case PIPE_CAP_GLSL_FEATURE_LEVEL: - return 330; - case PIPE_CAP_MAX_RENDER_TARGETS: - return 8; - case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: - return 1; case PIPE_CAP_FRAGMENT_COLOR_CLAMPED: case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: case PIPE_CAP_VERTEX_COLOR_CLAMPED: - return 1; case PIPE_CAP_QUERY_TIMESTAMP: case PIPE_CAP_QUERY_TIME_ELAPSED: case PIPE_CAP_OCCLUSION_QUERY: case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME: case PIPE_CAP_QUERY_PIPELINE_STATISTICS: - return 1; - case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: - return 4; - case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS: - case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS: - return 128; - case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES: - case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: - return 1024; case PIPE_CAP_BLEND_EQUATION_SEPARATE: case PIPE_CAP_INDEP_BLEND_ENABLE: case PIPE_CAP_INDEP_BLEND_FUNC: - return 1; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: - return 1; - case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: - return 0; - case PIPE_CAP_SHADER_STENCIL_EXPORT: - return 0; case PIPE_CAP_PRIMITIVE_RESTART: case PIPE_CAP_TGSI_INSTANCEID: case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: @@ -153,49 +156,36 @@ nvc0_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: case PIPE_CAP_START_INSTANCE: case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT: - return 1; - case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: - return 0; /* state trackers will know better */ case PIPE_CAP_USER_CONSTANT_BUFFERS: case PIPE_CAP_USER_INDEX_BUFFERS: case PIPE_CAP_USER_VERTEX_BUFFERS: + case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER: + case PIPE_CAP_TEXTURE_QUERY_LOD: + case PIPE_CAP_SAMPLE_SHADING: + case PIPE_CAP_TEXTURE_GATHER_OFFSETS: + case PIPE_CAP_TEXTURE_GATHER_SM5: return 1; - case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT: - return 256; - case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: - return 1; /* 256 for binding as RT, but that's not possible in GL */ - case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: - return NOUVEAU_MIN_BUFFER_MAP_ALIGN; + case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: + return (class_3d >= NVE4_3D_CLASS) ? 1 : 0; + case PIPE_CAP_COMPUTE: + return (class_3d == NVE4_3D_CLASS) ? 1 : 0; + + /* unsupported caps */ + case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: + case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: + case PIPE_CAP_SHADER_STENCIL_EXPORT: + case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY: case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY: case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY: - return 0; - case PIPE_CAP_COMPUTE: - return (class_3d == NVE4_3D_CLASS) ? 1 : 0; - case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER: - return 1; - case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: - return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50; - case PIPE_CAP_ENDIANNESS: - return PIPE_ENDIAN_LITTLE; case PIPE_CAP_TGSI_VS_LAYER: - case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_FAKE_SW_MSAA: - return 0; - case PIPE_CAP_MAX_VIEWPORTS: - return NVC0_MAX_VIEWPORTS; - case PIPE_CAP_TEXTURE_QUERY_LOD: - case PIPE_CAP_SAMPLE_SHADING: - case PIPE_CAP_TEXTURE_GATHER_OFFSETS: - return 1; - case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: - return 4; case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: return 0; - default: - NOUVEAU_ERR("unknown PIPE_CAP %d\n", param); - return 0; } + + NOUVEAU_ERR("unknown PIPE_CAP %d\n", param); + return 0; } static int -- 1.8.5.5
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- src/gallium/drivers/nouveau/nv50/nv50_screen.c | 124 ++++++++++++------------- 1 file changed, 57 insertions(+), 67 deletions(-) diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c b/src/gallium/drivers/nouveau/nv50/nv50_screen.c index 015f139..c09a8c6 100644 --- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c +++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c @@ -85,6 +85,7 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) const uint16_t class_3d = nouveau_screen(pscreen)->class_3d; switch (param) { + /* non-boolean caps */ case PIPE_CAP_MAX_TEXTURE_2D_LEVELS: return 14; case PIPE_CAP_MAX_TEXTURE_3D_LEVELS: @@ -99,6 +100,38 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET: case PIPE_CAP_MAX_TEXEL_OFFSET: return 7; + case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE: + return 65536; + case PIPE_CAP_GLSL_FEATURE_LEVEL: + return 330; + case PIPE_CAP_MAX_RENDER_TARGETS: + return 8; + case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: + return 1; + case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: + return 4; + case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS: + case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS: + return 64; + case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES: + case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: + return 1024; + case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT: + return 256; + case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: + return 1; /* 256 for binding as RT, but that's not possible in GL */ + case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: + return NOUVEAU_MIN_BUFFER_MAP_ALIGN; + case PIPE_CAP_MAX_VIEWPORTS: + return NV50_MAX_VIEWPORTS; + case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: + return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50; + case PIPE_CAP_ENDIANNESS: + return PIPE_ENDIAN_LITTLE; + case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: + return (class_3d >= NVA3_3D_CLASS) ? 4 : 0; + + /* supported caps */ case PIPE_CAP_TEXTURE_MIRROR_CLAMP: case PIPE_CAP_TEXTURE_SWIZZLE: case PIPE_CAP_TEXTURE_SHADOW_MAP: @@ -107,58 +140,20 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_ANISOTROPIC_FILTER: case PIPE_CAP_TEXTURE_BUFFER_OBJECTS: case PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT: - return 1; - case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE: - return 65536; - case PIPE_CAP_SEAMLESS_CUBE_MAP: - return 1; /* nv50_screen(pscreen)->tesla->oclass >= NVA0_3D_CLASS; */ - case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: - return 0; - case PIPE_CAP_CUBE_MAP_ARRAY: - return nv50_screen(pscreen)->tesla->oclass >= NVA3_3D_CLASS; case PIPE_CAP_TWO_SIDED_STENCIL: case PIPE_CAP_DEPTH_CLIP_DISABLE: case PIPE_CAP_POINT_SPRITE: - return 1; case PIPE_CAP_SM3: - return 1; - case PIPE_CAP_GLSL_FEATURE_LEVEL: - return 330; - case PIPE_CAP_MAX_RENDER_TARGETS: - return 8; - case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: - return 1; case PIPE_CAP_FRAGMENT_COLOR_CLAMPED: case PIPE_CAP_VERTEX_COLOR_UNCLAMPED: case PIPE_CAP_VERTEX_COLOR_CLAMPED: - return 1; case PIPE_CAP_QUERY_TIMESTAMP: case PIPE_CAP_QUERY_TIME_ELAPSED: case PIPE_CAP_OCCLUSION_QUERY: - return 1; - case PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS: - return 4; - case PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS: - case PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS: - return 64; - case PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES: - case PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS: - return 1024; - case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME: - return (class_3d >= NVA0_3D_CLASS) ? 1 : 0; case PIPE_CAP_BLEND_EQUATION_SEPARATE: case PIPE_CAP_INDEP_BLEND_ENABLE: - return 1; - case PIPE_CAP_INDEP_BLEND_FUNC: - return nv50_screen(pscreen)->tesla->oclass >= NVA3_3D_CLASS; case PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT: case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER: - return 1; - case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: - case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: - return 0; - case PIPE_CAP_SHADER_STENCIL_EXPORT: - return 0; case PIPE_CAP_PRIMITIVE_RESTART: case PIPE_CAP_TGSI_INSTANCEID: case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR: @@ -167,51 +162,46 @@ nv50_screen_get_param(struct pipe_screen *pscreen, enum pipe_cap param) case PIPE_CAP_TEXTURE_BARRIER: case PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION: case PIPE_CAP_START_INSTANCE: - return 1; - case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: - return 0; /* state trackers will know better */ case PIPE_CAP_USER_CONSTANT_BUFFERS: case PIPE_CAP_USER_INDEX_BUFFERS: case PIPE_CAP_USER_VERTEX_BUFFERS: + case PIPE_CAP_TEXTURE_MULTISAMPLE: + case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER: return 1; - case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT: - return 256; - case PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT: - return 1; /* 256 for binding as RT, but that's not possible in GL */ - case PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT: - return NOUVEAU_MIN_BUFFER_MAP_ALIGN; + case PIPE_CAP_SEAMLESS_CUBE_MAP: + return 1; /* class_3d >= NVA0_3D_CLASS; */ + /* supported on nva0+ */ + case PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME: + return class_3d >= NVA0_3D_CLASS; + /* supported on nva3+ */ + case PIPE_CAP_CUBE_MAP_ARRAY: + case PIPE_CAP_INDEP_BLEND_FUNC: + case PIPE_CAP_TEXTURE_QUERY_LOD: + case PIPE_CAP_SAMPLE_SHADING: + return class_3d >= NVA3_3D_CLASS; + + /* unsupported caps */ + case PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE: + case PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT: + case PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER: + case PIPE_CAP_SHADER_STENCIL_EXPORT: + case PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS: case PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY: case PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY: case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY: case PIPE_CAP_TGSI_TEXCOORD: - return 0; - case PIPE_CAP_TEXTURE_MULTISAMPLE: - return 1; - case PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER: - return 1; case PIPE_CAP_QUERY_PIPELINE_STATISTICS: - return 0; - case PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK: - return PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50; - case PIPE_CAP_ENDIANNESS: - return PIPE_ENDIAN_LITTLE; case PIPE_CAP_TGSI_VS_LAYER: case PIPE_CAP_TEXTURE_GATHER_SM5: case PIPE_CAP_FAKE_SW_MSAA: case PIPE_CAP_TEXTURE_GATHER_OFFSETS: case PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION: - return 0; - case PIPE_CAP_MAX_VIEWPORTS: - return NV50_MAX_VIEWPORTS; - case PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS: - return (class_3d >= NVA3_3D_CLASS) ? 4 : 0; - case PIPE_CAP_TEXTURE_QUERY_LOD: - case PIPE_CAP_SAMPLE_SHADING: - return class_3d >= NVA3_3D_CLASS; - default: - NOUVEAU_ERR("unknown PIPE_CAP %d\n", param); + case PIPE_CAP_COMPUTE: return 0; } + + NOUVEAU_ERR("unknown PIPE_CAP %d\n", param); + return 0; } static int -- 1.8.5.5