RT descriptors
This commit is contained in:
parent
7b24f52764
commit
e4e7c66808
9 changed files with 160 additions and 59 deletions
|
|
@ -67,6 +67,9 @@ export module Crafter.Graphics:Window;
|
|||
import std;
|
||||
import :Types;
|
||||
import Crafter.Event;
|
||||
#ifdef CRAFTER_GRAPHICS_VULKAN
|
||||
import :PipelineRTVulkan;
|
||||
#endif
|
||||
|
||||
export namespace Crafter {
|
||||
class Transform;
|
||||
|
|
@ -297,6 +300,7 @@ export namespace Crafter {
|
|||
xkb_keymap* xkb_keymap;
|
||||
xkb_context* xkb_context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
|
||||
xkb_state* xkb_state;
|
||||
std::vector<VkDescriptorSet> descriptorsRt;
|
||||
void Render();
|
||||
void QueueRender();
|
||||
void Resize(std::uint32_t width, std::uint32_t height);
|
||||
|
|
@ -306,6 +310,16 @@ export namespace Crafter {
|
|||
void SetTitle(const std::string_view title) override;
|
||||
VkCommandBuffer StartInit();
|
||||
void FinishInit();
|
||||
|
||||
template <typename Raygen, typename... Shaders>
|
||||
void SetPipelineRT() {
|
||||
rtPipeline = PipelineRTVulkan<Raygen, Shaders...>::pipeline;
|
||||
rtPipelineLayout = PipelineRTVulkan<Raygen, Shaders...>::pipelineLayout;
|
||||
raygenRegion = PipelineRTVulkan<Raygen, Shaders...>::raygenRegion;
|
||||
missRegion = PipelineRTVulkan<Raygen, Shaders...>::missRegion;
|
||||
hitRegion = PipelineRTVulkan<Raygen, Shaders...>::hitRegion;
|
||||
callableRegion = PipelineRTVulkan<Raygen, Shaders...>::callableRegion;
|
||||
}
|
||||
inline static wl_compositor* compositor = nullptr;
|
||||
static void wl_surface_frame_done(void *data, wl_callback *cb, uint32_t time);
|
||||
static void PointerListenerHandleMotion(void* data, wl_pointer* wl_pointer, uint time, wl_fixed_t surface_x, wl_fixed_t surface_y);
|
||||
|
|
@ -381,7 +395,13 @@ export namespace Crafter {
|
|||
Semaphores semaphores;
|
||||
uint32_t currentBuffer = 0;
|
||||
VkPipelineStageFlags submitPipelineStages = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
|
||||
VkRenderPass renderPass = VK_NULL_HANDLE;
|
||||
//VkRenderPass renderPass = VK_NULL_HANDLE;
|
||||
VkPipeline rtPipeline;
|
||||
VkPipelineLayout rtPipelineLayout;
|
||||
VkStridedDeviceAddressRegionKHR raygenRegion;
|
||||
VkStridedDeviceAddressRegionKHR missRegion;
|
||||
VkStridedDeviceAddressRegionKHR hitRegion;
|
||||
VkStridedDeviceAddressRegionKHR callableRegion;
|
||||
};
|
||||
#endif
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue