summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga
diff options
context:
space:
mode:
authorCharmaine Lee <charmainel@vmware.com>2017-12-07 09:35:00 -0800
committerBrian Paul <brianp@vmware.com>2018-09-10 13:07:30 -0600
commit49428c8d61274b452dc4885b44e4954d8634358e (patch)
tree0fafc1c41d5c05ae70c0ca495f9faf90a771e458 /src/gallium/drivers/svga
parent379a2f265f95b7a8efd4fd8d13ffef3622d2c62b (diff)
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>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r--src/gallium/drivers/svga/svga_format.c11
1 files changed, 6 insertions, 5 deletions
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;
}
}