libnx/nx/include/switch/gfx/buffer_producer.h

40 lines
1.2 KiB
C

#pragma once
#include <switch/gfx/nvioctl.h>
typedef struct {
u32 unk_x0;
nvioctl_fence nv_fence;
u32 unk_xc[0x18>>2];
} PACKED bufferProducerFence;
typedef struct {
s64 timestamp;
s32 isAutoTimestamp;
u32 crop[4];//Rect
s32 scalingMode;
u32 transform;
u32 stickyTransform;
u32 unk[2];
bufferProducerFence fence;
} PACKED bufferProducerQueueBufferInput;
typedef struct {
u32 width;
u32 height;
u32 transformHint;
u32 numPendingBuffers;
} PACKED bufferProducerQueueBufferOutput;
Result bufferProducerInitialize(binderSession *session);
void bufferProducerExit();
Result bufferProducerRequestBuffer(s32 bufferIdx);
Result bufferProducerDequeueBuffer(bool async, u32 width, u32 height, s32 format, u32 usage, s32 *buf, bufferProducerFence *fence);
Result bufferProducerDetachBuffer(s32 slot);
Result bufferProducerQueueBuffer(s32 buf, bufferProducerQueueBufferInput *input, bufferProducerQueueBufferOutput *output);
Result bufferProducerQuery(s32 what, s32* value);
Result bufferProducerConnect(s32 api, bool producerControlledByApp);
Result bufferProducerDisconnect(s32 api);
Result bufferProducerTegraBufferInit(s32 buf, u8 input[0x178]);