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 <brianp@vmware.com>
This commit is contained in:
Charmaine Lee 2017-12-07 09:35:00 -08:00 committed by Brian Paul
parent 379a2f265f
commit 49428c8d61
1 changed files with 6 additions and 5 deletions

View File

@ -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;
}
}