Revert "nine: Disable optional use of TTN when MUL_ZERO_WINS is available."
This reverts commit 7f01299c40
.
Now that I've got it hooked up to use_legacy_math_rules on the NIR side
and made sure that NIR frontends on drivers with
PIPE_CAP_LEGACY_MATH_RULES handle it, we should be able to enable this
again.
Fixes: #5678
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16176>
This commit is contained in:
@@ -3893,13 +3893,9 @@ nine_ureg_create_shader(struct ureg_program *ureg,
|
||||
assert(((struct tgsi_header *) &tgsi_tokens[0])->HeaderSize >= 2);
|
||||
enum pipe_shader_type shader_type = ((struct tgsi_processor *) &tgsi_tokens[1])->Processor;
|
||||
|
||||
/* NIR doesn't have mul_zero_wins */
|
||||
bool ttn_supported = !GET_CAP(TGSI_LEGACY_MATH_RULES);
|
||||
int preferred_ir = screen->get_shader_param(screen, shader_type, PIPE_SHADER_CAP_PREFERRED_IR);
|
||||
int supported_irs = screen->get_shader_param(screen, shader_type, PIPE_SHADER_CAP_SUPPORTED_IRS);
|
||||
bool prefer_nir = (preferred_ir == PIPE_SHADER_IR_NIR);
|
||||
bool use_nir = (prefer_nir && ttn_supported) ||
|
||||
!(supported_irs & (1 << PIPE_SHADER_IR_TGSI)) ||
|
||||
bool use_nir = prefer_nir ||
|
||||
((shader_type == PIPE_SHADER_VERTEX) && nine_shader_get_debug_flag(NINE_SHADER_DEBUG_OPTION_NIR_VS)) ||
|
||||
((shader_type == PIPE_SHADER_FRAGMENT) && nine_shader_get_debug_flag(NINE_SHADER_DEBUG_OPTION_NIR_PS));
|
||||
|
||||
|
Reference in New Issue
Block a user