|
|
|
@ -309,7 +309,7 @@ void RasterizerVulkan::DrawTexture() { |
|
|
|
texture_cache.SynchronizeGraphicsDescriptors(); |
|
|
|
texture_cache.UpdateRenderTargets(false); |
|
|
|
|
|
|
|
UpdateDynamicStates(); |
|
|
|
UpdateDynamicStates(DynamicStateScope::Blit); |
|
|
|
|
|
|
|
query_cache.CounterEnable(VideoCommon::QueryType::ZPassPixelCount64, |
|
|
|
maxwell3d->regs.zpass_pixel_count_enable); |
|
|
|
@ -925,13 +925,22 @@ bool AccelerateDMA::BufferToImage(const Tegra::DMA::ImageCopy& copy_info, |
|
|
|
return DmaBufferImageCopy<true>(copy_info, buffer_operand, image_operand); |
|
|
|
} |
|
|
|
|
|
|
|
void RasterizerVulkan::UpdateDynamicStates() { |
|
|
|
void RasterizerVulkan::UpdateDynamicStates(DynamicStateScope scope) { |
|
|
|
auto& regs = maxwell3d->regs; |
|
|
|
|
|
|
|
UpdateViewportsState(regs); |
|
|
|
UpdateScissorsState(regs); |
|
|
|
|
|
|
|
const bool is_blit_scope = scope == DynamicStateScope::Blit; |
|
|
|
if (!is_blit_scope) { |
|
|
|
UpdateDepthBias(regs); |
|
|
|
} |
|
|
|
UpdateBlendConstants(regs); |
|
|
|
|
|
|
|
if (is_blit_scope) { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
UpdateDepthBounds(regs); |
|
|
|
UpdateStencilFaces(regs); |
|
|
|
UpdateLineWidth(regs); |
|
|
|
@ -939,11 +948,16 @@ void RasterizerVulkan::UpdateDynamicStates() { |
|
|
|
const u8 dynamic_state = Settings::values.dyna_state.GetValue(); |
|
|
|
|
|
|
|
auto features = DynamicFeatures{ |
|
|
|
.has_extended_dynamic_state = device.IsExtExtendedDynamicStateSupported() && dynamic_state > 0, |
|
|
|
.has_extended_dynamic_state_2 = device.IsExtExtendedDynamicState2Supported() && dynamic_state > 1, |
|
|
|
.has_extended_dynamic_state_2_extra = device.IsExtExtendedDynamicState2ExtrasSupported() && dynamic_state > 1, |
|
|
|
.has_extended_dynamic_state_3_blend = device.IsExtExtendedDynamicState3BlendingSupported() && dynamic_state > 2, |
|
|
|
.has_extended_dynamic_state_3_enables = device.IsExtExtendedDynamicState3EnablesSupported() && dynamic_state > 2, |
|
|
|
.has_extended_dynamic_state = |
|
|
|
device.IsExtExtendedDynamicStateSupported() && dynamic_state > 0, |
|
|
|
.has_extended_dynamic_state_2 = |
|
|
|
device.IsExtExtendedDynamicState2Supported() && dynamic_state > 1, |
|
|
|
.has_extended_dynamic_state_2_extra = |
|
|
|
device.IsExtExtendedDynamicState2ExtrasSupported() && dynamic_state > 1, |
|
|
|
.has_extended_dynamic_state_3_blend = |
|
|
|
device.IsExtExtendedDynamicState3BlendingSupported() && dynamic_state > 2, |
|
|
|
.has_extended_dynamic_state_3_enables = |
|
|
|
device.IsExtExtendedDynamicState3EnablesSupported() && dynamic_state > 2, |
|
|
|
.has_dynamic_vertex_input = device.IsExtVertexInputDynamicStateSupported(), |
|
|
|
}; |
|
|
|
|
|
|
|
@ -982,8 +996,9 @@ void RasterizerVulkan::UpdateDynamicStates() { |
|
|
|
regs.vertex_attrib_format.end(), |
|
|
|
In(Maxwell3D::Regs::VertexAttribute::Type::Float)); |
|
|
|
|
|
|
|
if (regs.logic_op.enable) |
|
|
|
if (regs.logic_op.enable) { |
|
|
|
regs.logic_op.enable = static_cast<u32>(!has_float); |
|
|
|
} |
|
|
|
|
|
|
|
UpdateLogicOpEnable(regs); |
|
|
|
} else { |
|
|
|
|