mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 02:40:11 +01:00
nouveau/nir: Set the input for vertex/instance ID like TGSI does.
Doesn't seem to help tests, but clears a TODO about differences between them. Reviewed-by: Karol Herbst <kherbst@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16063>
This commit is contained in:
parent
801dca3c40
commit
f29706a25f
1 changed files with 6 additions and 4 deletions
|
|
@ -1004,19 +1004,21 @@ bool Converter::assignSlots() {
|
|||
BITSET_FOREACH_SET(i, nir->info.system_values_read, SYSTEM_VALUE_MAX) {
|
||||
info_out->sv[info_out->numSysVals].sn = tgsi_get_sysval_semantic(i);
|
||||
info_out->sv[info_out->numSysVals].si = 0;
|
||||
info_out->sv[info_out->numSysVals].input = 0; // TODO inferSysValDirection(sn);
|
||||
info_out->sv[info_out->numSysVals].input = 0;
|
||||
|
||||
switch (i) {
|
||||
case SYSTEM_VALUE_VERTEX_ID:
|
||||
info_out->sv[info_out->numSysVals].input = 1;
|
||||
info_out->io.vertexId = info_out->numSysVals;
|
||||
break;
|
||||
case SYSTEM_VALUE_INSTANCE_ID:
|
||||
info_out->sv[info_out->numSysVals].input = 1;
|
||||
info_out->io.instanceId = info_out->numSysVals;
|
||||
break;
|
||||
case SYSTEM_VALUE_TESS_LEVEL_INNER:
|
||||
case SYSTEM_VALUE_TESS_LEVEL_OUTER:
|
||||
info_out->sv[info_out->numSysVals].patch = 1;
|
||||
break;
|
||||
case SYSTEM_VALUE_VERTEX_ID:
|
||||
info_out->io.vertexId = info_out->numSysVals;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue