forked from MoonsideGames/Refresh
Enable multiDrawIndirect feature, add indirect command struct (#30)
Fixes a validation error when attempting to draw multiple primitives via an indirect draw call. Adds some documentation for how indirect draw buffers should be set up. Co-authored-by: Caleb Cornett <caleb.cornett@outlook.com> Reviewed-on: MoonsideGames/Refresh#30 Co-authored-by: TheSpydog <thespydog@noreply.example.org> Co-committed-by: TheSpydog <thespydog@noreply.example.org>no-fixed-command-buffers
parent
329ffab6b8
commit
e4215efe5e
|
@ -376,6 +376,14 @@ typedef struct Refresh_TextureSlice
|
||||||
uint32_t level;
|
uint32_t level;
|
||||||
} Refresh_TextureSlice;
|
} Refresh_TextureSlice;
|
||||||
|
|
||||||
|
typedef struct Refresh_IndirectDrawCommand
|
||||||
|
{
|
||||||
|
uint32_t vertexCount;
|
||||||
|
uint32_t instanceCount;
|
||||||
|
uint32_t firstVertex;
|
||||||
|
uint32_t firstInstance;
|
||||||
|
} Refresh_IndirectDrawCommand;
|
||||||
|
|
||||||
/* State structures */
|
/* State structures */
|
||||||
|
|
||||||
typedef struct Refresh_SamplerStateCreateInfo
|
typedef struct Refresh_SamplerStateCreateInfo
|
||||||
|
@ -666,6 +674,7 @@ REFRESHAPI void Refresh_DrawPrimitives(
|
||||||
);
|
);
|
||||||
|
|
||||||
/* Similar to Refresh_DrawPrimitives, but draw parameters are set from a buffer.
|
/* Similar to Refresh_DrawPrimitives, but draw parameters are set from a buffer.
|
||||||
|
* The buffer layout should match the layout of Refresh_IndirectDrawCommand.
|
||||||
*
|
*
|
||||||
* buffer: A buffer containing draw parameters.
|
* buffer: A buffer containing draw parameters.
|
||||||
* offsetInBytes: The offset to start reading from the draw buffer.
|
* offsetInBytes: The offset to start reading from the draw buffer.
|
||||||
|
|
|
@ -10537,6 +10537,7 @@ static uint8_t VULKAN_INTERNAL_CreateLogicalDevice(
|
||||||
SDL_zero(deviceFeatures);
|
SDL_zero(deviceFeatures);
|
||||||
deviceFeatures.fillModeNonSolid = VK_TRUE;
|
deviceFeatures.fillModeNonSolid = VK_TRUE;
|
||||||
deviceFeatures.samplerAnisotropy = VK_TRUE;
|
deviceFeatures.samplerAnisotropy = VK_TRUE;
|
||||||
|
deviceFeatures.multiDrawIndirect = VK_TRUE;
|
||||||
|
|
||||||
/* creating the logical device */
|
/* creating the logical device */
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue