Use nvhost fences in IHOSBinderDriver

This commit is contained in:
Billy Laws 2020-08-09 14:46:50 +01:00 committed by ◱ PixelyIon
parent 94d1b40faf
commit cae270a174
2 changed files with 3 additions and 10 deletions

View File

@ -5,6 +5,7 @@
#include <os.h>
#include <kernel/types/KProcess.h>
#include <services/nvdrv/INvDrvServices.h>
#include <services/nvdrv/fence.h>
#include <gpu/format.h>
#include "IHOSBinderDriver.h"
#include "display.h"
@ -70,7 +71,7 @@ namespace skyline::service::hosbinder {
u32 stickyTransform;
u64 _unk0_;
u32 swapInterval;
Fence fence[4];
nvdrv::Fence fence[4];
} *data = reinterpret_cast<Data *>(in.data.data());
auto buffer = queue.at(data->slot);
@ -104,7 +105,7 @@ namespace skyline::service::hosbinder {
void IHOSBinderDriver::CancelBuffer(Parcel &parcel) {
struct Data {
u32 slot;
Fence fence[4];
nvdrv::Fence fence[4];
} *data = reinterpret_cast<Data *>(parcel.data.data());
FreeBuffer(data->slot);
state.logger->Debug("CancelBuffer: Slot: {}", data->slot);

View File

@ -31,14 +31,6 @@ namespace skyline::service::hosbinder {
SetPreallocatedBuffer = 14, //!< No source on this but it's used to set a existing buffer according to libtransistor and libNX
};
/**
* @brief This represents conditions for the completion of an asynchronous graphics operation
*/
struct Fence {
u32 syncptId; //!< The ID of the syncpoint
u32 syncptValue; //!< The value of the syncpoint
};
/**
* @brief nvnflinger:dispdrv or nns::hosbinder::IHOSBinderDriver is responsible for writing buffers to the display
*/