From: Charmaine Lee Date: Thu, 7 Dec 2017 17:35:00 +0000 (-0800) Subject: svga: explicit set DXFMT_SHADER_SAMPLE for DS format for pre-SM41 device X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=49428c8d61274b452dc4885b44e4954d8634358e;p=mesa.git svga: explicit set DXFMT_SHADER_SAMPLE for DS format for pre-SM41 device Explicit set the DXFMT_SHADER_SAMPLE bit for depth stencil formats for pre-SM41 device only. This bit is now set by the SM41 device. Reviewed-by: Brian Paul --- diff --git a/src/gallium/drivers/svga/svga_format.c b/src/gallium/drivers/svga/svga_format.c index be68fb4610a..c9d5abe986e 100644 --- a/src/gallium/drivers/svga/svga_format.c +++ b/src/gallium/drivers/svga/svga_format.c @@ -1787,7 +1787,7 @@ svga_get_dx_format_cap(struct svga_screen *ss, (void) check_format_tables; #endif - assert(ss->sws->have_vgpu10); + assert(sws->have_vgpu10); assert(format < ARRAY_SIZE(format_cap_table)); entry = &format_cap_table[format]; assert(entry->format == format); @@ -1797,12 +1797,13 @@ svga_get_dx_format_cap(struct svga_screen *ss, if (entry->devcap) { sws->get_cap(sws, entry->devcap, caps); - /* svga device supports SHADER_SAMPLE capability for these - * formats but does not advertise the devcap. + /* pre-SM41 capabable svga device supports SHADER_SAMPLE capability for + * these formats but does not advertise the devcap. * So enable this bit here. */ - if (format == SVGA3D_R32_FLOAT_X8X24 || - format == SVGA3D_R24_UNORM_X8) { + if (!sws->have_sm4_1 && + (format == SVGA3D_R32_FLOAT_X8X24 || + format == SVGA3D_R24_UNORM_X8)) { caps->u |= SVGA3D_DXFMT_SHADER_SAMPLE; } }