mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-06 02:25:07 +01:00
Disable preserve buffer/texture attachment opt for now
Causes several issues and crashes in Pokemon without an obvious cause.
This commit is contained in:
parent
e483cf9634
commit
1cfc4278f9
@ -251,10 +251,11 @@ namespace skyline::gpu::interconnect {
|
|||||||
bool CommandExecutor::AttachTexture(TextureView *view) {
|
bool CommandExecutor::AttachTexture(TextureView *view) {
|
||||||
bool didLock{view->LockWithTag(tag)};
|
bool didLock{view->LockWithTag(tag)};
|
||||||
if (didLock) {
|
if (didLock) {
|
||||||
if (view->texture->FrequentlyLocked())
|
// TODO: fixup remaining bugs with this and add better heuristics to avoid pauses
|
||||||
attachedTextures.emplace_back(view->texture);
|
// if (view->texture->FrequentlyLocked())
|
||||||
else
|
attachedTextures.emplace_back(view->texture);
|
||||||
preserveAttachedTextures.emplace_back(view->texture);
|
// else
|
||||||
|
// preserveAttachedTextures.emplace_back(view->texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
return didLock;
|
return didLock;
|
||||||
@ -273,34 +274,33 @@ namespace skyline::gpu::interconnect {
|
|||||||
buffer->unlock();
|
buffer->unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CommandExecutor::AttachBufferBase(std::shared_ptr<Buffer> buffer) {
|
||||||
|
// TODO: fixup remaining bugs with this and add better heuristics to avoid pauses
|
||||||
|
// if (buffer->FrequentlyLocked())
|
||||||
|
attachedBuffers.emplace_back(std::move(buffer));
|
||||||
|
// else
|
||||||
|
// preserveAttachedBuffers.emplace_back(std::move(buffer));
|
||||||
|
}
|
||||||
|
|
||||||
bool CommandExecutor::AttachBuffer(BufferView &view) {
|
bool CommandExecutor::AttachBuffer(BufferView &view) {
|
||||||
bool didLock{view.LockWithTag(tag)};
|
bool didLock{view.LockWithTag(tag)};
|
||||||
if (didLock) {
|
if (didLock)
|
||||||
if (view.GetBuffer()->FrequentlyLocked())
|
AttachBufferBase(view.GetBuffer()->shared_from_this());
|
||||||
attachedBuffers.emplace_back(view.GetBuffer()->shared_from_this());
|
|
||||||
else
|
|
||||||
preserveAttachedBuffers.emplace_back(view.GetBuffer()->shared_from_this());
|
|
||||||
}
|
|
||||||
return didLock;
|
return didLock;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandExecutor::AttachLockedBufferView(BufferView &view, ContextLock<BufferView> &&lock) {
|
void CommandExecutor::AttachLockedBufferView(BufferView &view, ContextLock<BufferView> &&lock) {
|
||||||
if (lock.OwnsLock()) {
|
if (lock.OwnsLock()) {
|
||||||
// Transfer ownership to executor so that the resource will stay locked for the period it is used on the GPU
|
// Transfer ownership to executor so that the resource will stay locked for the period it is used on the GPU
|
||||||
if (view.GetBuffer()->FrequentlyLocked())
|
AttachBufferBase(view.GetBuffer()->shared_from_this());
|
||||||
attachedBuffers.emplace_back(view.GetBuffer()->shared_from_this());
|
|
||||||
else
|
|
||||||
preserveAttachedBuffers.emplace_back(view.GetBuffer()->shared_from_this());
|
|
||||||
lock.Release(); // The executor will handle unlocking the lock so it doesn't need to be handled here
|
lock.Release(); // The executor will handle unlocking the lock so it doesn't need to be handled here
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CommandExecutor::AttachLockedBuffer(std::shared_ptr<Buffer> buffer, ContextLock<Buffer> &&lock) {
|
void CommandExecutor::AttachLockedBuffer(std::shared_ptr<Buffer> buffer, ContextLock<Buffer> &&lock) {
|
||||||
if (lock.OwnsLock()) {
|
if (lock.OwnsLock()) {
|
||||||
if (buffer->FrequentlyLocked())
|
AttachBufferBase(std::move(buffer));
|
||||||
attachedBuffers.emplace_back(std::move(buffer));
|
|
||||||
else
|
|
||||||
preserveAttachedBuffers.emplace_back(std::move(buffer));
|
|
||||||
lock.Release(); // See AttachLockedBufferView(...)
|
lock.Release(); // See AttachLockedBufferView(...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,6 +154,8 @@ namespace skyline::gpu::interconnect {
|
|||||||
*/
|
*/
|
||||||
void ResetInternal();
|
void ResetInternal();
|
||||||
|
|
||||||
|
void AttachBufferBase(std::shared_ptr<Buffer> buffer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::shared_ptr<FenceCycle> cycle; //!< The fence cycle that this command executor uses to wait for the GPU to finish executing commands
|
std::shared_ptr<FenceCycle> cycle; //!< The fence cycle that this command executor uses to wait for the GPU to finish executing commands
|
||||||
LinearAllocatorState<> *allocator;
|
LinearAllocatorState<> *allocator;
|
||||||
|
Loading…
Reference in New Issue
Block a user