forked from MoonsideGames/Refresh
Compare commits
18 Commits
ca3c84d7fb
...
main
Author | SHA1 | Date |
---|---|---|
Caleb Cornett | f5b3e466a8 | |
cosmonaut | 2fb9a6931b | |
Hazel Stagner | c01ff21359 | |
cosmonaut | e5da75d33a | |
cosmonaut | 99e9dc5b8c | |
cosmonaut | 0e7720ccf6 | |
cosmonaut | 488cb8c535 | |
cosmonaut | 3007b4c989 | |
cosmonaut | 163adfb5cd | |
cosmonaut | f0b970496e | |
cosmonaut | 38d14fd99d | |
cosmonaut | 4bba0f99f9 | |
cosmonaut | acefc530fd | |
cosmonaut | 3820d458fe | |
cosmonaut | 7a0b0f5709 | |
cosmonaut | ce34f4a435 | |
TheSpydog | eb5617f40e | |
cosmonaut | 0380a96817 |
|
@ -8,8 +8,8 @@ option(BUILD_SHARED_LIBS "Build shared library" ON)
|
||||||
|
|
||||||
# Version
|
# Version
|
||||||
SET(LIB_MAJOR_VERSION "1")
|
SET(LIB_MAJOR_VERSION "1")
|
||||||
SET(LIB_MINOR_VERSION "2")
|
SET(LIB_MINOR_VERSION "5")
|
||||||
SET(LIB_REVISION "1")
|
SET(LIB_REVISION "0")
|
||||||
SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
|
SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
|
||||||
|
|
||||||
# Build Type
|
# Build Type
|
||||||
|
|
|
@ -55,8 +55,8 @@ extern "C" {
|
||||||
/* Version API */
|
/* Version API */
|
||||||
|
|
||||||
#define REFRESH_MAJOR_VERSION 1
|
#define REFRESH_MAJOR_VERSION 1
|
||||||
#define REFRESH_MINOR_VERSION 2
|
#define REFRESH_MINOR_VERSION 5
|
||||||
#define REFRESH_PATCH_VERSION 1
|
#define REFRESH_PATCH_VERSION 0
|
||||||
|
|
||||||
#define REFRESH_COMPILED_VERSION ( \
|
#define REFRESH_COMPILED_VERSION ( \
|
||||||
(REFRESH_MAJOR_VERSION * 100 * 100) + \
|
(REFRESH_MAJOR_VERSION * 100 * 100) + \
|
||||||
|
@ -107,15 +107,6 @@ typedef enum Refresh_StoreOp
|
||||||
REFRESH_STOREOP_DONT_CARE
|
REFRESH_STOREOP_DONT_CARE
|
||||||
} Refresh_StoreOp;
|
} Refresh_StoreOp;
|
||||||
|
|
||||||
typedef enum Refresh_ClearOptionsBits
|
|
||||||
{
|
|
||||||
REFRESH_CLEAROPTIONS_COLOR = 0x00000001,
|
|
||||||
REFRESH_CLEAROPTIONS_DEPTH = 0x00000002,
|
|
||||||
REFRESH_CLEAROPTIONS_STENCIL = 0x00000004,
|
|
||||||
} Refresh_ClearOptionsBits;
|
|
||||||
|
|
||||||
typedef uint32_t Refresh_ClearOptions;
|
|
||||||
|
|
||||||
typedef enum Refresh_IndexElementSize
|
typedef enum Refresh_IndexElementSize
|
||||||
{
|
{
|
||||||
REFRESH_INDEXELEMENTSIZE_16BIT,
|
REFRESH_INDEXELEMENTSIZE_16BIT,
|
||||||
|
@ -133,6 +124,7 @@ typedef enum Refresh_TextureFormat
|
||||||
REFRESH_TEXTUREFORMAT_BC1,
|
REFRESH_TEXTUREFORMAT_BC1,
|
||||||
REFRESH_TEXTUREFORMAT_BC2,
|
REFRESH_TEXTUREFORMAT_BC2,
|
||||||
REFRESH_TEXTUREFORMAT_BC3,
|
REFRESH_TEXTUREFORMAT_BC3,
|
||||||
|
REFRESH_TEXTUREFORMAT_BC7,
|
||||||
REFRESH_TEXTUREFORMAT_R8G8_SNORM,
|
REFRESH_TEXTUREFORMAT_R8G8_SNORM,
|
||||||
REFRESH_TEXTUREFORMAT_R8G8B8A8_SNORM,
|
REFRESH_TEXTUREFORMAT_R8G8B8A8_SNORM,
|
||||||
REFRESH_TEXTUREFORMAT_A2R10G10B10,
|
REFRESH_TEXTUREFORMAT_A2R10G10B10,
|
||||||
|
@ -193,7 +185,8 @@ typedef uint32_t Refresh_BufferUsageFlags;
|
||||||
|
|
||||||
typedef enum Refresh_VertexElementFormat
|
typedef enum Refresh_VertexElementFormat
|
||||||
{
|
{
|
||||||
REFRESH_VERTEXELEMENTFORMAT_SINGLE,
|
REFRESH_VERTEXELEMENTFORMAT_UINT,
|
||||||
|
REFRESH_VERTEXELEMENTFORMAT_FLOAT,
|
||||||
REFRESH_VERTEXELEMENTFORMAT_VECTOR2,
|
REFRESH_VERTEXELEMENTFORMAT_VECTOR2,
|
||||||
REFRESH_VERTEXELEMENTFORMAT_VECTOR3,
|
REFRESH_VERTEXELEMENTFORMAT_VECTOR3,
|
||||||
REFRESH_VERTEXELEMENTFORMAT_VECTOR4,
|
REFRESH_VERTEXELEMENTFORMAT_VECTOR4,
|
||||||
|
@ -495,7 +488,6 @@ typedef struct Refresh_RasterizerState
|
||||||
float depthBiasConstantFactor;
|
float depthBiasConstantFactor;
|
||||||
float depthBiasClamp;
|
float depthBiasClamp;
|
||||||
float depthBiasSlopeFactor;
|
float depthBiasSlopeFactor;
|
||||||
float lineWidth;
|
|
||||||
} Refresh_RasterizerState;
|
} Refresh_RasterizerState;
|
||||||
|
|
||||||
typedef struct Refresh_MultisampleState
|
typedef struct Refresh_MultisampleState
|
||||||
|
@ -607,30 +599,6 @@ REFRESHAPI void Refresh_DestroyDevice(Refresh_Device *device);
|
||||||
|
|
||||||
/* Drawing */
|
/* Drawing */
|
||||||
|
|
||||||
/* Clears the targets of the currently bound framebuffer.
|
|
||||||
* If fewer colors are passed than the number of color targets in the
|
|
||||||
* framebuffer, this function will clear the first n color targets.
|
|
||||||
*
|
|
||||||
* NOTE:
|
|
||||||
* It is generally recommended to clear in BeginRenderPass
|
|
||||||
* rather than by calling this function unless necessary.
|
|
||||||
*
|
|
||||||
* clearRect: Area to clear.
|
|
||||||
* options: Bitflags to specify color/depth/stencil buffers for clearing.
|
|
||||||
* colors: An array of color values for the cleared color buffers.
|
|
||||||
* colorCount: The number of colors in the above array.
|
|
||||||
* depthStencil: Depth and stencil values for the cleared depth stencil buffer.
|
|
||||||
*/
|
|
||||||
REFRESHAPI void Refresh_Clear(
|
|
||||||
Refresh_Device *device,
|
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Rect *clearRect,
|
|
||||||
Refresh_ClearOptions options,
|
|
||||||
Refresh_Vec4 *colors,
|
|
||||||
uint32_t colorCount,
|
|
||||||
Refresh_DepthStencilValue depthStencil
|
|
||||||
);
|
|
||||||
|
|
||||||
/* Draws data from vertex/index buffers with instancing enabled.
|
/* Draws data from vertex/index buffers with instancing enabled.
|
||||||
*
|
*
|
||||||
* baseVertex: The starting offset to read from the vertex buffer.
|
* baseVertex: The starting offset to read from the vertex buffer.
|
||||||
|
@ -988,6 +956,7 @@ REFRESHAPI void Refresh_QueueDestroyGraphicsPipeline(
|
||||||
* The area affected by the render pass.
|
* The area affected by the render pass.
|
||||||
* All load, store and resolve operations are restricted
|
* All load, store and resolve operations are restricted
|
||||||
* to the given rectangle.
|
* to the given rectangle.
|
||||||
|
* If NULL, a sensible default will be chosen.
|
||||||
* colorAttachmentInfos:
|
* colorAttachmentInfos:
|
||||||
* A pointer to an array of Refresh_ColorAttachmentInfo structures
|
* A pointer to an array of Refresh_ColorAttachmentInfo structures
|
||||||
* that contains render targets and clear values. May be NULL.
|
* that contains render targets and clear values. May be NULL.
|
||||||
|
@ -1135,17 +1104,22 @@ REFRESHAPI Refresh_CommandBuffer* Refresh_AcquireCommandBuffer(
|
||||||
|
|
||||||
/* Acquires a texture to use for presentation.
|
/* Acquires a texture to use for presentation.
|
||||||
* May return NULL under certain conditions.
|
* May return NULL under certain conditions.
|
||||||
* If NULL, the user must ensure to not present.
|
* If NULL, the user must ensure to not use the texture.
|
||||||
* Once a swapchain texture is acquired,
|
* Once a swapchain texture is acquired,
|
||||||
* it will automatically be presented on command buffer submission.
|
* it will automatically be presented on command buffer submission.
|
||||||
*
|
*
|
||||||
* NOTE:
|
* NOTE:
|
||||||
* It is not recommended to hold a reference to this texture long term.
|
* It is not recommended to hold a reference to this texture long term.
|
||||||
|
*
|
||||||
|
* pWidth: A pointer to a uint32 that will be filled with the texture width.
|
||||||
|
* pHeight: A pointer to a uint32 that will be filled with the texture height.
|
||||||
*/
|
*/
|
||||||
REFRESHAPI Refresh_Texture* Refresh_AcquireSwapchainTexture(
|
REFRESHAPI Refresh_Texture* Refresh_AcquireSwapchainTexture(
|
||||||
Refresh_Device *device,
|
Refresh_Device *device,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
void *windowHandle
|
void *windowHandle,
|
||||||
|
uint32_t *pWidth,
|
||||||
|
uint32_t *pHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Returns the format of the swapchain for the given window. */
|
/* Returns the format of the swapchain for the given window. */
|
||||||
|
|
|
@ -34,7 +34,12 @@
|
||||||
/* Drivers */
|
/* Drivers */
|
||||||
|
|
||||||
static const Refresh_Driver *drivers[] = {
|
static const Refresh_Driver *drivers[] = {
|
||||||
|
#ifdef REFRESH_DRIVER_VULKAN
|
||||||
&VulkanDriver,
|
&VulkanDriver,
|
||||||
|
#endif
|
||||||
|
#ifdef REFRESH_DRIVER_PS5
|
||||||
|
&PS5Driver,
|
||||||
|
#endif
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -147,27 +152,6 @@ void Refresh_DestroyDevice(Refresh_Device *device)
|
||||||
device->DestroyDevice(device);
|
device->DestroyDevice(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Refresh_Clear(
|
|
||||||
Refresh_Device *device,
|
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Rect *clearRect,
|
|
||||||
Refresh_ClearOptions options,
|
|
||||||
Refresh_Vec4 *colors,
|
|
||||||
uint32_t colorCount,
|
|
||||||
Refresh_DepthStencilValue depthStencil
|
|
||||||
) {
|
|
||||||
NULL_RETURN(device);
|
|
||||||
device->Clear(
|
|
||||||
device->driverData,
|
|
||||||
commandBuffer,
|
|
||||||
clearRect,
|
|
||||||
options,
|
|
||||||
colors,
|
|
||||||
colorCount,
|
|
||||||
depthStencil
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Refresh_DrawIndexedPrimitives(
|
void Refresh_DrawIndexedPrimitives(
|
||||||
Refresh_Device *device,
|
Refresh_Device *device,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
|
@ -729,13 +713,17 @@ Refresh_CommandBuffer* Refresh_AcquireCommandBuffer(
|
||||||
Refresh_Texture* Refresh_AcquireSwapchainTexture(
|
Refresh_Texture* Refresh_AcquireSwapchainTexture(
|
||||||
Refresh_Device *device,
|
Refresh_Device *device,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
void *windowHandle
|
void *windowHandle,
|
||||||
|
uint32_t *pWidth,
|
||||||
|
uint32_t *pHeight
|
||||||
) {
|
) {
|
||||||
NULL_RETURN_NULL(device);
|
NULL_RETURN_NULL(device);
|
||||||
return device->AcquireSwapchainTexture(
|
return device->AcquireSwapchainTexture(
|
||||||
device->driverData,
|
device->driverData,
|
||||||
commandBuffer,
|
commandBuffer,
|
||||||
windowHandle
|
windowHandle,
|
||||||
|
pWidth,
|
||||||
|
pHeight
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,15 @@
|
||||||
|
|
||||||
/* Logging */
|
/* Logging */
|
||||||
|
|
||||||
extern void Refresh_LogInfo(const char *fmt, ...);
|
#ifdef __cplusplus
|
||||||
extern void Refresh_LogWarn(const char *fmt, ...);
|
extern "C" {
|
||||||
extern void Refresh_LogError(const char *fmt, ...);
|
#endif
|
||||||
|
void Refresh_LogInfo(const char *fmt, ...);
|
||||||
|
void Refresh_LogWarn(const char *fmt, ...);
|
||||||
|
void Refresh_LogError(const char *fmt, ...);
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Internal Helper Utilities */
|
/* Internal Helper Utilities */
|
||||||
|
|
||||||
|
@ -51,6 +57,7 @@ static inline uint32_t Texture_GetFormatSize(
|
||||||
return 8;
|
return 8;
|
||||||
case REFRESH_TEXTUREFORMAT_BC2:
|
case REFRESH_TEXTUREFORMAT_BC2:
|
||||||
case REFRESH_TEXTUREFORMAT_BC3:
|
case REFRESH_TEXTUREFORMAT_BC3:
|
||||||
|
case REFRESH_TEXTUREFORMAT_BC7:
|
||||||
return 16;
|
return 16;
|
||||||
case REFRESH_TEXTUREFORMAT_R8:
|
case REFRESH_TEXTUREFORMAT_R8:
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -117,7 +124,8 @@ static inline uint32_t BytesPerRow(
|
||||||
|
|
||||||
if ( format == REFRESH_TEXTUREFORMAT_BC1 ||
|
if ( format == REFRESH_TEXTUREFORMAT_BC1 ||
|
||||||
format == REFRESH_TEXTUREFORMAT_BC2 ||
|
format == REFRESH_TEXTUREFORMAT_BC2 ||
|
||||||
format == REFRESH_TEXTUREFORMAT_BC3 )
|
format == REFRESH_TEXTUREFORMAT_BC3 ||
|
||||||
|
format == REFRESH_TEXTUREFORMAT_BC7 )
|
||||||
{
|
{
|
||||||
blocksPerRow = (width + 3) / 4;
|
blocksPerRow = (width + 3) / 4;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +143,8 @@ static inline int32_t BytesPerImage(
|
||||||
|
|
||||||
if ( format == REFRESH_TEXTUREFORMAT_BC1 ||
|
if ( format == REFRESH_TEXTUREFORMAT_BC1 ||
|
||||||
format == REFRESH_TEXTUREFORMAT_BC2 ||
|
format == REFRESH_TEXTUREFORMAT_BC2 ||
|
||||||
format == REFRESH_TEXTUREFORMAT_BC3 )
|
format == REFRESH_TEXTUREFORMAT_BC3 ||
|
||||||
|
format == REFRESH_TEXTUREFORMAT_BC7 )
|
||||||
{
|
{
|
||||||
blocksPerRow = (width + 3) / 4;
|
blocksPerRow = (width + 3) / 4;
|
||||||
blocksPerColumn = (height + 3) / 4;
|
blocksPerColumn = (height + 3) / 4;
|
||||||
|
@ -168,16 +177,6 @@ struct Refresh_Device
|
||||||
|
|
||||||
/* Drawing */
|
/* Drawing */
|
||||||
|
|
||||||
void (*Clear)(
|
|
||||||
Refresh_Renderer *driverData,
|
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Rect *clearRect,
|
|
||||||
Refresh_ClearOptions options,
|
|
||||||
Refresh_Vec4 *colors,
|
|
||||||
uint32_t colorCount,
|
|
||||||
Refresh_DepthStencilValue depthStencil
|
|
||||||
);
|
|
||||||
|
|
||||||
void (*DrawInstancedPrimitives)(
|
void (*DrawInstancedPrimitives)(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
|
@ -451,7 +450,9 @@ struct Refresh_Device
|
||||||
Refresh_Texture* (*AcquireSwapchainTexture)(
|
Refresh_Texture* (*AcquireSwapchainTexture)(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
void *windowHandle
|
void *windowHandle,
|
||||||
|
uint32_t *pWidth,
|
||||||
|
uint32_t *pHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
Refresh_TextureFormat (*GetSwapchainFormat)(
|
Refresh_TextureFormat (*GetSwapchainFormat)(
|
||||||
|
@ -477,7 +478,6 @@ struct Refresh_Device
|
||||||
result->func = name##_##func;
|
result->func = name##_##func;
|
||||||
#define ASSIGN_DRIVER(name) \
|
#define ASSIGN_DRIVER(name) \
|
||||||
ASSIGN_DRIVER_FUNC(DestroyDevice, name) \
|
ASSIGN_DRIVER_FUNC(DestroyDevice, name) \
|
||||||
ASSIGN_DRIVER_FUNC(Clear, name) \
|
|
||||||
ASSIGN_DRIVER_FUNC(DrawIndexedPrimitives, name) \
|
ASSIGN_DRIVER_FUNC(DrawIndexedPrimitives, name) \
|
||||||
ASSIGN_DRIVER_FUNC(DrawInstancedPrimitives, name) \
|
ASSIGN_DRIVER_FUNC(DrawInstancedPrimitives, name) \
|
||||||
ASSIGN_DRIVER_FUNC(DrawPrimitives, name) \
|
ASSIGN_DRIVER_FUNC(DrawPrimitives, name) \
|
||||||
|
@ -531,6 +531,7 @@ typedef struct Refresh_Driver
|
||||||
} Refresh_Driver;
|
} Refresh_Driver;
|
||||||
|
|
||||||
extern Refresh_Driver VulkanDriver;
|
extern Refresh_Driver VulkanDriver;
|
||||||
|
extern Refresh_Driver PS5Driver;
|
||||||
|
|
||||||
#endif /* REFRESH_DRIVER_H */
|
#endif /* REFRESH_DRIVER_H */
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
static TEMPLATE_SURFACE_FORMAT_TYPE RefreshToTEMPLATE_SurfaceFormat[] =
|
static TEMPLATE_SURFACE_FORMAT_TYPE RefreshToTEMPLATE_SurfaceFormat[] =
|
||||||
{
|
{
|
||||||
0, /* R8G8B8A8 */
|
0, /* R8G8B8A8 */
|
||||||
|
0, /* B8G8R8A8 */
|
||||||
0, /* R5G6B5 */
|
0, /* R5G6B5 */
|
||||||
0, /* A1R5G5B5 */
|
0, /* A1R5G5B5 */
|
||||||
0, /* B4G4R4A4 */
|
0, /* B4G4R4A4 */
|
||||||
|
@ -96,7 +97,6 @@ static TEMPLATE_POLYGON_MODE_TYPE RefreshToTEMPLATE_PolygonMode[] =
|
||||||
{
|
{
|
||||||
0, /* FILL */
|
0, /* FILL */
|
||||||
0, /* LINE */
|
0, /* LINE */
|
||||||
0 /* POINT */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static TEMPLATE_CULL_MODE_TYPE RefreshToTEMPLATE_CullMode[] =
|
static TEMPLATE_CULL_MODE_TYPE RefreshToTEMPLATE_CullMode[] =
|
||||||
|
@ -104,7 +104,6 @@ static TEMPLATE_CULL_MODE_TYPE RefreshToTEMPLATE_CullMode[] =
|
||||||
0, /* NONE */
|
0, /* NONE */
|
||||||
0, /* FRONT */
|
0, /* FRONT */
|
||||||
0, /* BACK */
|
0, /* BACK */
|
||||||
0 /* FRONT_AND_BACK */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static TEMPLATE_FRONT_FACE_TYPE RefreshToTEMPLATE_FrontFace[] =
|
static TEMPLATE_FRONT_FACE_TYPE RefreshToTEMPLATE_FrontFace[] =
|
||||||
|
@ -127,8 +126,6 @@ static TEMPLATE_BLEND_FACTOR_TYPE RefreshToTEMPLATE_BlendFactor[] =
|
||||||
0, /* ONE_MINUS_DST_ALPHA */
|
0, /* ONE_MINUS_DST_ALPHA */
|
||||||
0, /* CONSTANT_COLOR */
|
0, /* CONSTANT_COLOR */
|
||||||
0, /* ONE_MINUS_CONSTANT_COLOR */
|
0, /* ONE_MINUS_CONSTANT_COLOR */
|
||||||
0, /* CONSTANT_ALPHA */
|
|
||||||
0, /* ONE_MINUS_CONSTANT_ALPHA */
|
|
||||||
0, /* SRC_ALPHA_SATURATE */
|
0, /* SRC_ALPHA_SATURATE */
|
||||||
0, /* SRC1_COLOR */
|
0, /* SRC1_COLOR */
|
||||||
0, /* ONE_MINUS_SRC1_COLOR */
|
0, /* ONE_MINUS_SRC1_COLOR */
|
||||||
|
@ -145,26 +142,6 @@ static TEMPLATE_BLEND_OP_TYPE RefreshToTEMPLATE_BlendOp[] =
|
||||||
0 /* MAX */
|
0 /* MAX */
|
||||||
};
|
};
|
||||||
|
|
||||||
static TEMPLATE_LOGIC_OP_TYPE RefreshToTEMPLATE_LogicOp[] =
|
|
||||||
{
|
|
||||||
0, /* CLEAR */
|
|
||||||
0, /* AND */
|
|
||||||
0, /* AND_REVERSE */
|
|
||||||
0, /* COPY */
|
|
||||||
0, /* AND_INVERTED */
|
|
||||||
0, /* NO_OP */
|
|
||||||
0, /* XOR */
|
|
||||||
0, /* OR */
|
|
||||||
0, /* NOR */
|
|
||||||
0, /* EQUIVALENT */
|
|
||||||
0, /* INVERT */
|
|
||||||
0, /* OR_REVERSE */
|
|
||||||
0, /* COPY_INVERTED */
|
|
||||||
0, /* OR_INVERTED */
|
|
||||||
0, /* NAND */
|
|
||||||
0 /* SET */
|
|
||||||
};
|
|
||||||
|
|
||||||
static TEMPLATE_COMPARE_OP_TYPE RefreshToTEMPLATE_CompareOp[] =
|
static TEMPLATE_COMPARE_OP_TYPE RefreshToTEMPLATE_CompareOp[] =
|
||||||
{
|
{
|
||||||
0, /* NEVER */
|
0, /* NEVER */
|
||||||
|
@ -223,7 +200,6 @@ static TEMPLATE_FILTER_TYPE RefreshToTEMPLATE_Filter[] =
|
||||||
{
|
{
|
||||||
0, /* NEAREST */
|
0, /* NEAREST */
|
||||||
0, /* LINEAR */
|
0, /* LINEAR */
|
||||||
0 /* CUBIC */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static TEMPLATE_SAMPLER_MIPMAP_MODE_TYPE RefreshToTEMPLATE_SamplerMipmapMode[] =
|
static TEMPLATE_SAMPLER_MIPMAP_MODE_TYPE RefreshToTEMPLATE_SamplerMipmapMode[] =
|
||||||
|
@ -260,18 +236,6 @@ static void TEMPLATE_DestroyDevice(
|
||||||
|
|
||||||
/* Drawing */
|
/* Drawing */
|
||||||
|
|
||||||
static void TEMPLATE_Clear(
|
|
||||||
Refresh_Renderer *driverData,
|
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Rect *clearRect,
|
|
||||||
Refresh_ClearOptions options,
|
|
||||||
Refresh_Vec4 *colors,
|
|
||||||
uint32_t colorCount,
|
|
||||||
Refresh_DepthStencilValue depthStencil
|
|
||||||
) {
|
|
||||||
NOT_IMPLEMENTED
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TEMPLATE_DrawInstancedPrimitives(
|
static void TEMPLATE_DrawInstancedPrimitives(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
|
@ -324,7 +288,7 @@ static void TEMPLATE_DispatchCompute(
|
||||||
|
|
||||||
static Refresh_ComputePipeline* TEMPLATE_CreateComputePipeline(
|
static Refresh_ComputePipeline* TEMPLATE_CreateComputePipeline(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_ComputePipelineCreateInfo *pipelineCreateInfo
|
Refresh_ComputeShaderInfo *computeShaderInfo
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
@ -357,14 +321,6 @@ static Refresh_Texture* TEMPLATE_CreateTexture(
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
static Refresh_RenderTarget* TEMPLATE_CreateRenderTarget(
|
|
||||||
Refresh_Renderer *driverData,
|
|
||||||
Refresh_TextureSlice *textureSlice,
|
|
||||||
Refresh_SampleCount multisampleCount
|
|
||||||
) {
|
|
||||||
NOT_IMPLEMENTED
|
|
||||||
}
|
|
||||||
|
|
||||||
static Refresh_Buffer* TEMPLATE_CreateBuffer(
|
static Refresh_Buffer* TEMPLATE_CreateBuffer(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_BufferUsageFlags usageFlags,
|
Refresh_BufferUsageFlags usageFlags,
|
||||||
|
@ -491,7 +447,6 @@ static void TEMPLATE_GetBufferData(
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroyTexture(
|
static void TEMPLATE_QueueDestroyTexture(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Texture *texture
|
Refresh_Texture *texture
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
|
@ -499,7 +454,6 @@ static void TEMPLATE_QueueDestroyTexture(
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroySampler(
|
static void TEMPLATE_QueueDestroySampler(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Sampler *sampler
|
Refresh_Sampler *sampler
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
|
@ -507,33 +461,20 @@ static void TEMPLATE_QueueDestroySampler(
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroyBuffer(
|
static void TEMPLATE_QueueDestroyBuffer(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_Buffer *buffer
|
Refresh_Buffer *buffer
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroyRenderTarget(
|
|
||||||
Refresh_Renderer *driverData,
|
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_RenderTarget *renderTarget
|
|
||||||
) {
|
|
||||||
NOT_IMPLEMENTED
|
|
||||||
}
|
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroyShaderModule(
|
static void TEMPLATE_QueueDestroyShaderModule(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
|
|
||||||
Refresh_ShaderModule *shaderModule
|
Refresh_ShaderModule *shaderModule
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroyComputePipeline(
|
static void TEMPLATE_QueueDestroyComputePipeline(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_ComputePipeline *computePipeline
|
Refresh_ComputePipeline *computePipeline
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
|
@ -541,7 +482,6 @@ static void TEMPLATE_QueueDestroyComputePipeline(
|
||||||
|
|
||||||
static void TEMPLATE_QueueDestroyGraphicsPipeline(
|
static void TEMPLATE_QueueDestroyGraphicsPipeline(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
|
||||||
Refresh_GraphicsPipeline *graphicsPipeline
|
Refresh_GraphicsPipeline *graphicsPipeline
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
|
@ -575,6 +515,22 @@ static void TEMPLATE_BindGraphicsPipeline(
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void TEMPLATE_SetViewport(
|
||||||
|
Refresh_Renderer *driverData,
|
||||||
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
|
Refresh_Viewport *viewport
|
||||||
|
) {
|
||||||
|
NOT_IMPLEMENTED
|
||||||
|
}
|
||||||
|
|
||||||
|
static void TEMPLATE_SetScissor(
|
||||||
|
Refresh_Renderer *driverData,
|
||||||
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
|
Refresh_Rect *scissor
|
||||||
|
) {
|
||||||
|
NOT_IMPLEMENTED
|
||||||
|
}
|
||||||
|
|
||||||
static void TEMPLATE_BindVertexBuffers(
|
static void TEMPLATE_BindVertexBuffers(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
|
@ -627,12 +583,18 @@ static Refresh_CommandBuffer* TEMPLATE_AcquireCommandBuffer(
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
}
|
}
|
||||||
|
|
||||||
static void TEMPLATE_QueuePresent(
|
Refresh_Texture* TEMPLATE_AcquireSwapchainTexture(
|
||||||
Refresh_Renderer *driverData,
|
Refresh_Renderer *driverData,
|
||||||
Refresh_CommandBuffer *commandBuffer,
|
Refresh_CommandBuffer *commandBuffer,
|
||||||
Refresh_TextureSlice *textureSlice,
|
void *windowHandle,
|
||||||
Refresh_Rect *destinationRectangle,
|
uint32_t *pWidth,
|
||||||
Refresh_Filter filter,
|
uint32_t *pHeight
|
||||||
|
) {
|
||||||
|
NOT_IMPLEMENTED
|
||||||
|
}
|
||||||
|
|
||||||
|
Refresh_TextureFormat TEMPLATE_GetSwapchainFormat(
|
||||||
|
Refresh_Renderer *driverData,
|
||||||
void *windowHandle
|
void *windowHandle
|
||||||
) {
|
) {
|
||||||
NOT_IMPLEMENTED
|
NOT_IMPLEMENTED
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue