commit
6cf90f739b
|
@ -1742,6 +1742,9 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||||
input.view = vk->hw.image->image_view;
|
input.view = vk->hw.image->image_view;
|
||||||
input.layout = vk->hw.image->image_layout;
|
input.layout = vk->hw.image->image_layout;
|
||||||
|
|
||||||
|
/* The format can change on a whim. */
|
||||||
|
input.format = vk->hw.image->create_info.format;
|
||||||
|
|
||||||
if (frame)
|
if (frame)
|
||||||
{
|
{
|
||||||
input.width = frame_width;
|
input.width = frame_width;
|
||||||
|
@ -1769,6 +1772,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
||||||
input.layout = tex->layout;
|
input.layout = tex->layout;
|
||||||
input.width = tex->width;
|
input.width = tex->width;
|
||||||
input.height = tex->height;
|
input.height = tex->height;
|
||||||
|
input.format = VK_FORMAT_UNDEFINED; /* It's already configured. */
|
||||||
}
|
}
|
||||||
|
|
||||||
vulkan_filter_chain_set_input_texture((vulkan_filter_chain_t*)vk->filter_chain, &input);
|
vulkan_filter_chain_set_input_texture((vulkan_filter_chain_t*)vk->filter_chain, &input);
|
||||||
|
|
|
@ -210,9 +210,10 @@ class Framebuffer
|
||||||
Framebuffer(Framebuffer&&) = delete;
|
Framebuffer(Framebuffer&&) = delete;
|
||||||
void operator=(Framebuffer&&) = delete;
|
void operator=(Framebuffer&&) = delete;
|
||||||
|
|
||||||
void set_size(DeferredDisposer &disposer, const Size2D &size);
|
void set_size(DeferredDisposer &disposer, const Size2D &size, VkFormat format = VK_FORMAT_UNDEFINED);
|
||||||
|
|
||||||
const Size2D &get_size() const { return size; }
|
const Size2D &get_size() const { return size; }
|
||||||
|
VkFormat get_format() const { return format; }
|
||||||
VkImage get_image() const { return image; }
|
VkImage get_image() const { return image; }
|
||||||
VkImageView get_view() const { return view; }
|
VkImageView get_view() const { return view; }
|
||||||
VkFramebuffer get_framebuffer() const { return framebuffer; }
|
VkFramebuffer get_framebuffer() const { return framebuffer; }
|
||||||
|
@ -1009,9 +1010,10 @@ void vulkan_filter_chain::update_history(DeferredDisposer &disposer, VkCommandBu
|
||||||
swap(back, tmp);
|
swap(back, tmp);
|
||||||
|
|
||||||
if (input_texture.width != tmp->get_size().width ||
|
if (input_texture.width != tmp->get_size().width ||
|
||||||
input_texture.height != tmp->get_size().height)
|
input_texture.height != tmp->get_size().height ||
|
||||||
|
(input_texture.format != VK_FORMAT_UNDEFINED && input_texture.format != tmp->get_format()))
|
||||||
{
|
{
|
||||||
tmp->set_size(disposer, { input_texture.width, input_texture.height });
|
tmp->set_size(disposer, { input_texture.width, input_texture.height }, input_texture.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp->copy(cmd, input_texture.image, src_layout);
|
tmp->copy(cmd, input_texture.image, src_layout);
|
||||||
|
@ -2422,12 +2424,14 @@ void Framebuffer::init_framebuffer()
|
||||||
vkCreateFramebuffer(device, &info, nullptr, &framebuffer);
|
vkCreateFramebuffer(device, &info, nullptr, &framebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size)
|
void Framebuffer::set_size(DeferredDisposer &disposer, const Size2D &size, VkFormat format)
|
||||||
{
|
{
|
||||||
this->size = size;
|
this->size = size;
|
||||||
|
if (format != VK_FORMAT_UNDEFINED)
|
||||||
|
this->format = format;
|
||||||
|
|
||||||
RARCH_LOG("[Vulkan filter chain]: Updating framebuffer size %u x %u.\n",
|
RARCH_LOG("[Vulkan filter chain]: Updating framebuffer size %u x %u (format: %u).\n",
|
||||||
size.width, size.height);
|
size.width, size.height, (unsigned)this->format);
|
||||||
|
|
||||||
{
|
{
|
||||||
// The current framebuffers, etc, might still be in use
|
// The current framebuffers, etc, might still be in use
|
||||||
|
|
|
@ -53,6 +53,7 @@ struct vulkan_filter_chain_texture
|
||||||
VkImageLayout layout;
|
VkImageLayout layout;
|
||||||
unsigned width;
|
unsigned width;
|
||||||
unsigned height;
|
unsigned height;
|
||||||
|
VkFormat format;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum vulkan_filter_chain_scale
|
enum vulkan_filter_chain_scale
|
||||||
|
|
|
@ -170,6 +170,7 @@ static void switch_joypad_poll(void)
|
||||||
{
|
{
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
hidSetNpadJoyAssignmentModeSingleByDefault(i);
|
||||||
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
hidSetNpadJoyAssignmentModeSingleByDefault(i + 1);
|
||||||
|
hidSetNpadJoyHoldType(HidJoyHoldType_Horizontal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastMode = 1;
|
lastMode = 1;
|
||||||
|
@ -185,6 +186,7 @@ static void switch_joypad_poll(void)
|
||||||
{
|
{
|
||||||
hidSetNpadJoyAssignmentModeDual(i);
|
hidSetNpadJoyAssignmentModeDual(i);
|
||||||
hidSetNpadJoyAssignmentModeDual(i + 1);
|
hidSetNpadJoyAssignmentModeDual(i + 1);
|
||||||
|
hidMergeSingleJoyAsDualJoy(i, i + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lastMode = 0;
|
lastMode = 0;
|
||||||
|
|
Loading…
Reference in New Issue