Skip to content

Commit

Permalink
Use nvhost fences in IHOSBinderDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
bylaws authored and PixelyIon committed Aug 15, 2020
1 parent 94d1b40 commit cae270a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit cae270a

Please sign in to comment.