rsx: Fix alpha ref

- The alpha ref register is compared directly to the ROP output register in realhw
- alpha ref content must match bit-width of ROP register, which means fp16 values are possible
This commit is contained in:
kd-11 2020-05-07 21:00:12 +03:00 committed by Ivan
parent 8e2b2bc179
commit a1b6415c5a
4 changed files with 72 additions and 7 deletions

View file

@ -742,7 +742,7 @@ namespace rsx
{
//TODO: Properly support alpha-to-coverage and alpha-to-one behavior in shaders
auto fragment_alpha_func = rsx::method_registers.alpha_func();
auto alpha_ref = rsx::method_registers.alpha_ref() / 255.f;
auto alpha_ref = rsx::method_registers.alpha_ref();
auto rop_control = rsx::method_registers.alpha_test_enabled()? 1u : 0u;
if (rsx::method_registers.msaa_alpha_to_coverage_enabled() && !backend_config.supports_hw_a2c)