[vulkan] Get fisheye working except for translucency

The OIT heads buffer is only a single-layer image, which breaks cube
map rendering, but once this is sorted, it looks like fisheye will work
well.
This commit is contained in:
Bill Currie 2023-06-26 14:03:19 +09:00
parent 7ba347cb6c
commit 8f1de6865f
5 changed files with 10 additions and 11 deletions

View file

@ -54,6 +54,5 @@ struct vulkan_ctx_s;
void Vulkan_Output_Init (struct vulkan_ctx_s *ctx);
void Vulkan_Output_Setup (struct vulkan_ctx_s *ctx);
void Vulkan_Output_Shutdown (struct vulkan_ctx_s *ctx);
void Vulkan_Output_SetInput (struct vulkan_ctx_s *ctx, VkImageView input);
#endif//__QF_Vulkan_qf_output_h

View file

@ -720,6 +720,7 @@ init_rpCreate (uint32_t index, const qfv_renderinfo_t *rinfo, objstate_t *s)
*s->rpc = (VkRenderPassCreateInfo) {
.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO,
.pNext = s->rpi->pNext,
.attachmentCount = s->rpi->framebuffer.num_attachments,
.pAttachments = attachments,
.subpassCount = s->rpi->num_subpasses,

View file

@ -1423,11 +1423,10 @@ renderpasses = {
@inherit = $renderpasses.deferred;
@next = (VkRenderPassMultiviewCreateInfo, {
viewMasks = (0x3fu, 0x3fu, 0x3fu, 0x3fu, 0x3fu);
viewOffsets = ( 0, 0, 0, 0, 0);
});
framebuffer = {
width = $render_output.extent.width;
height = $render_output.extent.height;
width = "min($render_output.extent.width,$render_output.extent.height)";
height = "min($render_output.extent.width,$render_output.extent.height)";
layers = 1;
attachments = {
depth = {
@ -1475,6 +1474,7 @@ renderpasses = {
};
};
};
output = cube_output;
};
output = {
color = "[0, 1, 1, 1]";

View file

@ -363,10 +363,3 @@ Vulkan_Output_Shutdown (vulkan_ctx_t *ctx)
free (octx->frames.a);
free (octx);
}
void
Vulkan_Output_SetInput (vulkan_ctx_t *ctx, VkImageView input)
{
outputctx_t *octx = ctx->output_context;
octx->input = input;
}

View file

@ -209,4 +209,10 @@ Vulkan_ConfigOutput (vulkan_ctx_t *ctx, qfv_output_t *output)
if (vulkan_frame_height > 0) {
output->extent.height = vulkan_frame_height;
}
if (scr_fisheye) {//FIXME
auto w = output->extent.width;
auto h = output->extent.height;
output->extent.width = min (w, h);
output->extent.height = min (w, h);
}
}