[GPU] Fix min/max blend operations to properly apply factors
Applies factors before the MIN/MAX operation - in FSI/ROV via runtime blending, in FBO/RTV by pre-multiplying shader output when dstFactor is ONE only, as we don't have access to dest to provide full support as we do in the FSI/ROV paths.
This commit is contained in:
@@ -34,7 +34,7 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
// TODO(Triang3l): Change to 0xYYYYMMDD once it's out of the rapid
|
||||
// prototyping stage (easier to do small granular updates with an
|
||||
// incremental counter).
|
||||
static constexpr uint32_t kVersion = 7;
|
||||
static constexpr uint32_t kVersion = 8;
|
||||
|
||||
enum class DepthStencilMode : uint32_t {
|
||||
kNoModifiers,
|
||||
@@ -83,6 +83,12 @@ class SpirvShaderTranslator : public ShaderTranslator {
|
||||
uint32_t param_gen_point : 1;
|
||||
// For host render targets - depth / stencil output mode.
|
||||
DepthStencilMode depth_stencil_mode : 3;
|
||||
// For host render targets with MIN/MAX blend op - the source blend factor
|
||||
// to pre-multiply the shader output by (since Vulkan/D3D12 MIN/MAX
|
||||
// ignores blend factors, but Xbox 360 applies them). kOne means no
|
||||
// pre-multiply. Only RT0 is supported for now.
|
||||
xenos::BlendFactor rt0_blend_rgb_factor_for_premult : 5;
|
||||
xenos::BlendFactor rt0_blend_a_factor_for_premult : 5;
|
||||
} pixel;
|
||||
uint64_t value = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user