mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-06 06:25:09 +01:00
Calculate renderarea from attachment min size
This commit is contained in:
parent
4a3cd69257
commit
516ece6b04
@ -294,6 +294,16 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
|||||||
{surfaceClip.horizontal.width, surfaceClip.vertical.height}
|
{surfaceClip.horizontal.width, surfaceClip.vertical.height}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto colorAttachments{activeState.GetColorAttachments()};
|
||||||
|
auto depthStencilAttachment{activeState.GetDepthAttachment()};
|
||||||
|
auto depthStencilAttachmentSpan{depthStencilAttachment ? span<TextureView *>(depthStencilAttachment) : span<TextureView *>()};
|
||||||
|
for (auto attachment : ranges::views::concat(colorAttachments, depthStencilAttachmentSpan)) {
|
||||||
|
if (attachment) {
|
||||||
|
scissor.extent.width = std::min(scissor.extent.width, static_cast<u32>(static_cast<i32>(attachment->texture->dimensions.width) - scissor.offset.x));
|
||||||
|
scissor.extent.height = std::min(scissor.extent.height, static_cast<u32>(static_cast<i32>(attachment->texture->dimensions.height) - scissor.offset.y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ctx.executor.AddSubpass([drawParams](vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &, GPU &gpu, vk::RenderPass, u32) {
|
ctx.executor.AddSubpass([drawParams](vk::raii::CommandBuffer &commandBuffer, const std::shared_ptr<FenceCycle> &, GPU &gpu, vk::RenderPass, u32) {
|
||||||
drawParams->stateUpdater.RecordAll(gpu, commandBuffer);
|
drawParams->stateUpdater.RecordAll(gpu, commandBuffer);
|
||||||
|
|
||||||
|
@ -204,11 +204,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t PackedPipelineState::GetColorRenderTargetCount() const {
|
size_t PackedPipelineState::GetColorRenderTargetCount() const {
|
||||||
for (size_t i{engine::ColorTargetCount}; i > 0 ; i--)
|
return ctSelect.count;
|
||||||
if (IsColorRenderTargetEnabled(ctSelect[i - 1]))
|
|
||||||
return i;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
texture::Format PackedPipelineState::GetDepthRenderTargetFormat() const {
|
texture::Format PackedPipelineState::GetDepthRenderTargetFormat() const {
|
||||||
|
Loading…
Reference in New Issue
Block a user