[Bf-blender-cvs] [39db9b836bc] temp-ghost-vulkan: Removed debug code.
Jeroen Bakker
noreply at git.blender.org
Tue Nov 1 08:43:09 CET 2022
Commit: 39db9b836bc8de4351d975a8e45fcaf1036be99d
Author: Jeroen Bakker
Date: Tue Oct 25 15:55:06 2022 +0200
Branches: temp-ghost-vulkan
https://developer.blender.org/rB39db9b836bc8de4351d975a8e45fcaf1036be99d
Removed debug code.
===================================================================
M intern/ghost/intern/GHOST_ContextVK.cpp
M intern/ghost/intern/GHOST_ContextVK.h
===================================================================
diff --git a/intern/ghost/intern/GHOST_ContextVK.cpp b/intern/ghost/intern/GHOST_ContextVK.cpp
index 3446f7e71f8..a9152a005e2 100644
--- a/intern/ghost/intern/GHOST_ContextVK.cpp
+++ b/intern/ghost/intern/GHOST_ContextVK.cpp
@@ -145,7 +145,6 @@ GHOST_ContextVK::GHOST_ContextVK(bool stereoVisual,
m_swapchain(VK_NULL_HANDLE),
m_render_pass(VK_NULL_HANDLE)
{
- printf("WARNING: Vulkan support is experimental.\n");
}
GHOST_ContextVK::~GHOST_ContextVK()
@@ -614,38 +613,6 @@ static GHOST_TSuccess selectPresentMode(VkPhysicalDevice device,
return GHOST_kFailure;
}
-/* This is only for testing. */
-GHOST_TSuccess GHOST_ContextVK::recordCommandBuffers(void)
-{
- for (int i = 0; i < m_command_buffers.size(); i++) {
- VkCommandBufferBeginInfo begin_info = {};
- begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
- begin_info.flags = 0;
- begin_info.pInheritanceInfo = NULL;
-
- VK_CHECK(vkBeginCommandBuffer(m_command_buffers[i], &begin_info));
- {
- VkRect2D area = {};
- area.offset = {0, 0};
- area.extent = m_render_extent;
- VkClearValue clearColor = {{{0.0f, 0.5f, 0.3f, 1.0f}}};
- VkRenderPassBeginInfo render_pass_info = {};
- render_pass_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
- render_pass_info.renderPass = m_render_pass;
- render_pass_info.framebuffer = m_swapchain_framebuffers[i];
- render_pass_info.renderArea = area;
- render_pass_info.clearValueCount = 1;
- render_pass_info.pClearValues = &clearColor;
-
- vkCmdBeginRenderPass(m_command_buffers[i], &render_pass_info, VK_SUBPASS_CONTENTS_INLINE);
-
- vkCmdEndRenderPass(m_command_buffers[i]);
- }
- VK_CHECK(vkEndCommandBuffer(m_command_buffers[i]));
- }
- return GHOST_kSuccess;
-}
-
GHOST_TSuccess GHOST_ContextVK::createCommandBuffers(void)
{
m_command_buffers.resize(m_swapchain_image_views.size());
@@ -665,8 +632,6 @@ GHOST_TSuccess GHOST_ContextVK::createCommandBuffers(void)
VK_CHECK(vkAllocateCommandBuffers(m_device, &alloc_info, m_command_buffers.data()));
- recordCommandBuffers();
-
return GHOST_kSuccess;
}
diff --git a/intern/ghost/intern/GHOST_ContextVK.h b/intern/ghost/intern/GHOST_ContextVK.h
index d2f5de6162e..0520466e04d 100644
--- a/intern/ghost/intern/GHOST_ContextVK.h
+++ b/intern/ghost/intern/GHOST_ContextVK.h
@@ -47,9 +47,6 @@ typedef enum {
} GHOST_TVulkanPlatformType;
class GHOST_ContextVK : public GHOST_Context {
- /* XR code needs low level graphics data to send to OpenXR. */
- // friend class GHOST_XrGraphicsBindingOpenGL;
-
public:
/**
* Constructor.
@@ -153,8 +150,7 @@ class GHOST_ContextVK : public GHOST_Context {
#ifdef _WIN32
HWND m_hwnd;
#elif defined(__APPLE__)
- /* FIXME CAMetalLayer but have issue with linking. */
- void *m_metal_layer;
+ CAMetalLayer *m_metal_layer;
#else /* Linux */
GHOST_TVulkanPlatformType m_platform;
/* X11 */
More information about the Bf-blender-cvs
mailing list