Skip to content

Commit

Permalink
vulkan: fix compilation on 32-bit
Browse files Browse the repository at this point in the history
VkDeviceSize != size_t on 32-bit platforms, which makes this a pointer
type mismatch.

Fixes #95
  • Loading branch information
haasn committed Mar 16, 2021
1 parent 2d2aaff commit 0697e57
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/vulkan/gpu.c
Expand Up @@ -3228,8 +3228,8 @@ static void vk_pass_run(const struct pl_gpu *gpu,
buf_barrier(gpu, cmd, vert, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT,
vbo_flags, 0, vert->params.size, BUF_READ);

vk->CmdBindVertexBuffers(cmd->buf, 0, 1, &vert_vk->mem.buf,
&(size_t){vert_vk->mem.offset + params->buf_offset});
VkDeviceSize offset = vert_vk->mem.offset + params->buf_offset;
vk->CmdBindVertexBuffers(cmd->buf, 0, 1, &vert_vk->mem.buf, &offset);

if (index) {
if (index != vert) {
Expand Down

0 comments on commit 0697e57

Please sign in to comment.