Implement HLE macros for render target clears (#3528)
* Implement HLE macros for render target clears * Add constants for the offsets
This commit is contained in:
parent
c48a75979f
commit
1080f64df9
16 changed files with 149 additions and 43 deletions
|
@ -149,14 +149,14 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return texture is TextureView view && view.Valid;
|
||||
}
|
||||
|
||||
public ClearRect GetClearRect(Rectangle<int> scissor, int layer)
|
||||
public ClearRect GetClearRect(Rectangle<int> scissor, int layer, int layerCount)
|
||||
{
|
||||
int x = scissor.X;
|
||||
int y = scissor.Y;
|
||||
int width = Math.Min((int)Width - scissor.X, scissor.Width);
|
||||
int height = Math.Min((int)Height - scissor.Y, scissor.Height);
|
||||
|
||||
return new ClearRect(new Rect2D(new Offset2D(x, y), new Extent2D((uint)width, (uint)height)), (uint)layer, 1);
|
||||
return new ClearRect(new Rect2D(new Offset2D(x, y), new Extent2D((uint)width, (uint)height)), (uint)layer, (uint)layerCount);
|
||||
}
|
||||
|
||||
public unsafe Auto<DisposableFramebuffer> Create(Vk api, CommandBufferScoped cbs, Auto<DisposableRenderPass> renderPass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue