svga: support TGSI_SEMANTIC_TEXCOORD in swtnl draw context

Since PIPE_CAP_TGSI_TEXCOORD is now enabled, texcoord is now declared
as TGSI_SEMANTIC_TEXCOORD instead of TGSI_SEMANTIC_GENERIC.

Fixes assert running REDTurbineDEMO with MTL Renderer when the guest needs to
fallback to swtnl for line stipple.

Fixes: e73443b7a5 ("svga: enable PIPE_CAP_TGSI_TEXCOORD for vgpu10 and up")

Reviewed-by: Martin Krastev <krastevm@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18113>
(cherry picked from commit 854e8797ac)
This commit is contained in:
Charmaine Lee
2022-08-15 18:55:45 -07:00
committed by Dylan Baker
parent 16dc6872c3
commit 185b583ae1
2 changed files with 9 additions and 2 deletions

View File

@@ -544,7 +544,7 @@
"description": "svga: support TGSI_SEMANTIC_TEXCOORD in swtnl draw context",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "e73443b7a502c06637d2eac0e8ef1c5cf449a341"
},

View File

@@ -1,5 +1,5 @@
/**********************************************************
* Copyright 2008-2009 VMware, Inc. All rights reserved.
* Copyright 2008-2022 VMware, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
@@ -273,6 +273,13 @@ svga_swtnl_update_vdecl(struct svga_context *svga)
offset += 16;
nr_decls++;
break;
case TGSI_SEMANTIC_TEXCOORD:
draw_emit_vertex_attr(vinfo, EMIT_4F, src);
vdecl[nr_decls].identity.usage = SVGA3D_DECLUSAGE_TEXCOORD;
vdecl[nr_decls].identity.type = SVGA3D_DECLTYPE_FLOAT4;
offset += 16;
nr_decls++;
break;
case TGSI_SEMANTIC_FOG:
draw_emit_vertex_attr(vinfo, EMIT_1F, src);
vdecl[nr_decls].identity.usage = SVGA3D_DECLUSAGE_TEXCOORD;