mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-19 17:10:54 -05:00
Metal: Argument Buffer Pre-Pass (#38)
* Init * Fix missing flags * Cleanup
This commit is contained in:
committed by
Evan Husted
parent
e8de1156eb
commit
782299c123
@@ -82,6 +82,17 @@ namespace Ryujinx.Graphics.Metal
|
||||
|
||||
public MTLRenderCommandEncoder GetOrCreateRenderEncoder(bool forDraw = false)
|
||||
{
|
||||
// Mark all state as dirty to ensure it is set on the new encoder
|
||||
if (Cbs.Encoders.CurrentEncoderType != EncoderType.Render)
|
||||
{
|
||||
_encoderStateManager.SignalRenderDirty();
|
||||
}
|
||||
|
||||
if (forDraw)
|
||||
{
|
||||
_encoderStateManager.RenderResourcesPrepass();
|
||||
}
|
||||
|
||||
MTLRenderCommandEncoder renderCommandEncoder = Cbs.Encoders.EnsureRenderEncoder();
|
||||
|
||||
if (forDraw)
|
||||
@@ -99,6 +110,17 @@ namespace Ryujinx.Graphics.Metal
|
||||
|
||||
public MTLComputeCommandEncoder GetOrCreateComputeEncoder(bool forDispatch = false)
|
||||
{
|
||||
// Mark all state as dirty to ensure it is set on the new encoder
|
||||
if (Cbs.Encoders.CurrentEncoderType != EncoderType.Compute)
|
||||
{
|
||||
_encoderStateManager.SignalComputeDirty();
|
||||
}
|
||||
|
||||
if (forDispatch)
|
||||
{
|
||||
_encoderStateManager.ComputeResourcesPrepass();
|
||||
}
|
||||
|
||||
MTLComputeCommandEncoder computeCommandEncoder = Cbs.Encoders.EnsureComputeEncoder();
|
||||
|
||||
if (forDispatch)
|
||||
|
||||
Reference in New Issue
Block a user