Browse Source

Fix conflicts

pull/294/head
MaranBr 4 months ago
parent
commit
6bdb121625
  1. 3
      src/video_core/renderer_vulkan/vk_graphics_pipeline.h
  2. 7
      src/video_core/renderer_vulkan/vk_rasterizer.cpp

3
src/video_core/renderer_vulkan/vk_graphics_pipeline.h

@ -80,8 +80,7 @@ public:
PipelineStatistics* pipeline_statistics, RenderPassCache& render_pass_cache, PipelineStatistics* pipeline_statistics, RenderPassCache& render_pass_cache,
const GraphicsPipelineCacheKey& key, std::array<vk::ShaderModule, NUM_STAGES> stages, const GraphicsPipelineCacheKey& key, std::array<vk::ShaderModule, NUM_STAGES> stages,
const std::array<const Shader::Info*, NUM_STAGES>& infos); const std::array<const Shader::Info*, NUM_STAGES>& infos);
// True if this pipeline was created with VK_DYNAMIC_STATE_VERTEX_INPUT_EXT
bool HasDynamicVertexInput() const noexcept { return key.state.dynamic_vertex_input; }
GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = delete; GraphicsPipeline& operator=(GraphicsPipeline&&) noexcept = delete;
GraphicsPipeline(GraphicsPipeline&&) noexcept = delete; GraphicsPipeline(GraphicsPipeline&&) noexcept = delete;

7
src/video_core/renderer_vulkan/vk_rasterizer.cpp

@ -1002,11 +1002,9 @@ void RasterizerVulkan::UpdateDynamicStates() {
} }
} }
if (device.IsExtVertexInputDynamicStateSupported() && dynamic_state > 2) { if (device.IsExtVertexInputDynamicStateSupported() && dynamic_state > 2) {
if (auto* gp = pipeline_cache.CurrentGraphicsPipeline(); gp && gp->HasDynamicVertexInput()) {
UpdateVertexInput(regs); UpdateVertexInput(regs);
} }
} }
}
void RasterizerVulkan::HandleTransformFeedback() { void RasterizerVulkan::HandleTransformFeedback() {
static std::once_flag warn_unsupported; static std::once_flag warn_unsupported;
@ -1035,9 +1033,7 @@ void RasterizerVulkan::UpdateViewportsState(Tegra::Engines::Maxwell3D::Regs& reg
float y = static_cast<float>(regs.surface_clip.y); float y = static_cast<float>(regs.surface_clip.y);
float width = static_cast<float>(regs.surface_clip.width); float width = static_cast<float>(regs.surface_clip.width);
float height = static_cast<float>(regs.surface_clip.height); float height = static_cast<float>(regs.surface_clip.height);
const bool lower_left =
regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft;
const bool lower_left = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft;
if (lower_left) { if (lower_left) {
// Vulkan viewport space is top-left; emulate lower-left with negative height. // Vulkan viewport space is top-left; emulate lower-left with negative height.
y += height; y += height;
@ -1082,7 +1078,6 @@ void RasterizerVulkan::UpdateScissorsState(Tegra::Engines::Maxwell3D::Regs& regs
u32 y = regs.surface_clip.y; u32 y = regs.surface_clip.y;
u32 width = regs.surface_clip.width ? regs.surface_clip.width : 1u; u32 width = regs.surface_clip.width ? regs.surface_clip.width : 1u;
u32 height = regs.surface_clip.height ? regs.surface_clip.height : 1u; u32 height = regs.surface_clip.height ? regs.surface_clip.height : 1u;
if (regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft) { if (regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft) {
// Vulkan scissor is top-left; convert from lower-left coordinates. // Vulkan scissor is top-left; convert from lower-left coordinates.
y = regs.surface_clip.height - (y + height); y = regs.surface_clip.height - (y + height);

Loading…
Cancel
Save