Skip to content

Commit

Permalink
rendervulkan: Use getprocaddr for vkCreateImageView
Browse files Browse the repository at this point in the history
  • Loading branch information
misyltoad committed Feb 6, 2024
1 parent b14d851 commit 5618b6c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "color_helpers.h"
#include "gamescope_shared.h"
#include "vulkan_include.h"

#include "vulkan/vulkan_core.h"
#include <cassert>
#include <span>
#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions src/rendervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <array>
#include <bitset>
#include <thread>
#include <vulkan/vulkan_core.h>
#include "vulkan_include.h"

#if defined(__linux__)
#include <sys/sysmacros.h>
Expand Down Expand Up @@ -2315,7 +2315,7 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
createInfo.format = VK_FORMAT_R8_UNORM;

createInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_PLANE_0_BIT;
res = vkCreateImageView(g_device.device(), &createInfo, nullptr, &m_lumaView);
res = g_device.vk.CreateImageView(g_device.device(), &createInfo, nullptr, &m_lumaView);
if ( res != VK_SUCCESS ) {
vk_errorf( res, "vkCreateImageView failed" );
return false;
Expand All @@ -2324,7 +2324,7 @@ bool CVulkanTexture::BInit( uint32_t width, uint32_t height, uint32_t depth, uin
createInfo.pNext = NULL;
createInfo.format = VK_FORMAT_R8G8_UNORM;
createInfo.subresourceRange.aspectMask = VK_IMAGE_ASPECT_PLANE_1_BIT;
res = vkCreateImageView(g_device.device(), &createInfo, nullptr, &m_chromaView);
res = g_device.vk.CreateImageView(g_device.device(), &createInfo, nullptr, &m_chromaView);
if ( res != VK_SUCCESS ) {
vk_errorf( res, "vkCreateImageView failed" );
return false;
Expand Down
4 changes: 4 additions & 0 deletions src/vulkan_include.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#pragma once

#define VK_NO_PROTOTYPES
#include <vulkan/vulkan_core.h>
3 changes: 2 additions & 1 deletion src/wlserver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
#include <set>
#include <list>
#include <optional>
#include <vulkan/vulkan_core.h>

#include "vulkan_include.h"

#include "steamcompmgr_shared.hpp"

Expand Down

0 comments on commit 5618b6c

Please sign in to comment.