mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 22:58:31 +02:00
microsoft/compiler: More robustly handle setting Register=-1
This is the 'N/A mask' case in the DXIL disassembly.
This logic is taken from: 7c9e487afd/tools/clang/tools/dxcompiler/dxcdisassembler.cpp (L106)
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12513>
This commit is contained in:
parent
62c3492d0b
commit
88220083cf
1 changed files with 7 additions and 3 deletions
|
|
@ -50,8 +50,8 @@ struct semantic_info {
|
|||
static bool
|
||||
is_depth_output(enum dxil_semantic_kind kind)
|
||||
{
|
||||
return kind == DXIL_SEM_DEPTH ||
|
||||
kind == DXIL_SEM_STENCIL_REF;
|
||||
return kind == DXIL_SEM_DEPTH || kind == DXIL_SEM_DEPTH_GE ||
|
||||
kind == DXIL_SEM_DEPTH_LE || kind == DXIL_SEM_STENCIL_REF;
|
||||
}
|
||||
|
||||
static uint8_t
|
||||
|
|
@ -111,7 +111,11 @@ get_additional_semantic_info(nir_shader *s, nir_variable *var, struct semantic_i
|
|||
info->rows = 1;
|
||||
if (info->kind == DXIL_SEM_TARGET) {
|
||||
info->start_row = info->index;
|
||||
} else if (is_depth || (info->kind == DXIL_SEM_PRIMITIVE_ID && is_gs_shader)) {
|
||||
} else if (is_depth ||
|
||||
(info->kind == DXIL_SEM_PRIMITIVE_ID && is_gs_shader) ||
|
||||
info->kind == DXIL_SEM_COVERAGE ||
|
||||
info->kind == DXIL_SEM_SAMPLE_INDEX) {
|
||||
// This turns into a 'N/A' mask in the disassembly
|
||||
info->start_row = -1;
|
||||
} else if (var->data.compact) {
|
||||
if (var->data.location_frac) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue