Use C comments instead of C++ comments for C files
This commit is contained in:
parent
77a52bcec5
commit
73afe24266
|
@ -1411,8 +1411,9 @@ static void ctr_render_bottom_screen(void *data)
|
|||
}
|
||||
}
|
||||
|
||||
// graphic function originates from here:
|
||||
// https://github.com/smealum/3ds_hb_menu/blob/master/source/gfx.c
|
||||
/* graphic function originates from here:
|
||||
* https://github.com/smealum/3ds_hb_menu/blob/master/source/gfx.c
|
||||
*/
|
||||
void ctr_fade_bottom_screen(gfxScreen_t screen, gfx3dSide_t side, u32 f)
|
||||
{
|
||||
#ifndef CONSOLE_LOG
|
||||
|
|
|
@ -2331,7 +2331,7 @@ static bool d3d10_gfx_frame(
|
|||
|
||||
d3d10->pass[i].rotation = retroarch_get_rotation();
|
||||
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
Should always be 1 for non-use of subframes */
|
||||
if (!(d3d10->flags & D3D10_ST_FLAG_FRAME_DUPE_LOCK))
|
||||
{
|
||||
|
@ -2431,10 +2431,10 @@ static bool d3d10_gfx_frame(
|
|||
D3D10_RECT scissor_rect;
|
||||
|
||||
scissor_rect.left = 0;
|
||||
scissor_rect.top = (unsigned int)(((float)d3d10->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
scissor_rect.top = (unsigned int)(((float)d3d10->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
* (float)video_info->current_subframe);
|
||||
scissor_rect.right = d3d10->pass[i].viewport.Width ;
|
||||
scissor_rect.bottom = (unsigned int)(((float)d3d10->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
scissor_rect.bottom = (unsigned int)(((float)d3d10->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
* (float)(video_info->current_subframe + 1));
|
||||
|
||||
d3d10->device->lpVtbl->RSSetScissorRects(d3d10->device, 1,
|
||||
|
@ -2452,7 +2452,7 @@ static bool d3d10_gfx_frame(
|
|||
d3d10->device->lpVtbl->RSSetScissorRects(d3d10->device, 1,
|
||||
&scissor_rect);
|
||||
}
|
||||
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
context->lpVtbl->Draw(context, 4, 0);
|
||||
texture = &d3d10->pass[i].rt;
|
||||
|
@ -2485,7 +2485,7 @@ static bool d3d10_gfx_frame(
|
|||
d3d10->clearcolor);
|
||||
context->lpVtbl->RSSetViewports(context, 1, &d3d10->frame.viewport);
|
||||
|
||||
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
if ( (video_info->shader_subframes > 1)
|
||||
&& (video_info->scan_subframes)
|
||||
&& !black_frame_insertion
|
||||
|
@ -2497,17 +2497,17 @@ static bool d3d10_gfx_frame(
|
|||
D3D10_RECT scissor_rect;
|
||||
|
||||
scissor_rect.left = 0;
|
||||
scissor_rect.top = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
scissor_rect.top = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
* (float)video_info->current_subframe);
|
||||
scissor_rect.right = video_width ;
|
||||
scissor_rect.bottom = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
scissor_rect.bottom = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
* (float)(video_info->current_subframe + 1));
|
||||
|
||||
d3d10->device->lpVtbl->RSSetScissorRects(d3d10->device, 1,
|
||||
&scissor_rect);
|
||||
}
|
||||
else
|
||||
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
|
||||
{
|
||||
D3D10_RECT scissor_rect;
|
||||
|
||||
|
@ -2524,7 +2524,7 @@ static bool d3d10_gfx_frame(
|
|||
context->lpVtbl->OMSetBlendState(context, d3d10->blend_enable, NULL,
|
||||
D3D10_DEFAULT_SAMPLE_MASK);
|
||||
|
||||
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
{
|
||||
D3D10_RECT scissor_rect;
|
||||
|
||||
|
@ -2536,7 +2536,7 @@ static bool d3d10_gfx_frame(
|
|||
d3d10->device->lpVtbl->RSSetScissorRects(d3d10->device, 1,
|
||||
&scissor_rect);
|
||||
}
|
||||
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
if ( (d3d10->flags & D3D10_ST_FLAG_MENU_ENABLE)
|
||||
&& d3d10->menu.texture.handle)
|
||||
|
@ -2680,7 +2680,7 @@ static bool d3d10_gfx_frame(
|
|||
context->lpVtbl->ClearRenderTargetView(context, d3d10->renderTargetView, d3d10->clearcolor);
|
||||
DXGIPresent(d3d10->swapChain, d3d10->swap_interval, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Frame duping for Shader Subframes, don't combine with swap_interval > 1, BFI.
|
||||
|
@ -2696,12 +2696,12 @@ static bool d3d10_gfx_frame(
|
|||
&& (!(d3d10->flags & D3D10_ST_FLAG_FRAME_DUPE_LOCK)))
|
||||
{
|
||||
d3d10->flags |= D3D10_ST_FLAG_FRAME_DUPE_LOCK;
|
||||
|
||||
|
||||
for (k = 1; k < video_info->shader_subframes; k++)
|
||||
{
|
||||
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
video_info->current_subframe = k;
|
||||
#endif // D3D10_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D10_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
if (d3d10->shader_preset)
|
||||
for (m = 0; m < d3d10->shader_preset->passes; m++)
|
||||
|
|
|
@ -3028,7 +3028,7 @@ static bool d3d11_gfx_frame(
|
|||
context, width, height, pitch, d3d11->format, frame, &d3d11->frame.texture[0]);
|
||||
}
|
||||
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
if ( (video_info->shader_subframes > 1)
|
||||
&& (video_info->scan_subframes)
|
||||
&& !black_frame_insertion
|
||||
|
@ -3036,14 +3036,12 @@ static bool d3d11_gfx_frame(
|
|||
&& !runloop_is_slowmotion
|
||||
&& !runloop_is_paused
|
||||
&& (!(d3d11->flags & D3D11_ST_FLAG_MENU_ENABLE)))
|
||||
{
|
||||
context->lpVtbl->RSSetState(context, d3d11->scissor_enabled);
|
||||
}
|
||||
else
|
||||
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
|
||||
{
|
||||
context->lpVtbl->RSSetState(context, d3d11->scissor_disabled);
|
||||
}
|
||||
}
|
||||
|
||||
d3d11->context->lpVtbl->OMSetBlendState(
|
||||
d3d11->context, d3d11->blend_disable,
|
||||
|
@ -3096,7 +3094,7 @@ static bool d3d11_gfx_frame(
|
|||
|
||||
d3d11->pass[i].rotation = retroarch_get_rotation();
|
||||
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
Should always be 1 for non-use of subframes */
|
||||
if (!(d3d11->flags & D3D11_ST_FLAG_FRAME_DUPE_LOCK))
|
||||
{
|
||||
|
@ -3177,7 +3175,7 @@ static bool d3d11_gfx_frame(
|
|||
&d3d11->pass[i].rt.rt_view, NULL);
|
||||
context->lpVtbl->RSSetViewports(context, 1, &d3d11->pass[i].viewport);
|
||||
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
if ( (video_info->shader_subframes > 1)
|
||||
&& (video_info->scan_subframes)
|
||||
&& !black_frame_insertion
|
||||
|
@ -3189,10 +3187,10 @@ static bool d3d11_gfx_frame(
|
|||
D3D11_RECT scissor_rect;
|
||||
|
||||
scissor_rect.left = 0;
|
||||
scissor_rect.top = (unsigned int)(((float)d3d11->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
scissor_rect.top = (unsigned int)(((float)d3d11->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
* (float)video_info->current_subframe);
|
||||
scissor_rect.right = d3d11->pass[i].viewport.Width ;
|
||||
scissor_rect.bottom = (unsigned int)(((float)d3d11->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
scissor_rect.bottom = (unsigned int)(((float)d3d11->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
* (float)(video_info->current_subframe + 1));
|
||||
|
||||
d3d11->context->lpVtbl->RSSetScissorRects(d3d11->context, 1,
|
||||
|
@ -3210,7 +3208,7 @@ static bool d3d11_gfx_frame(
|
|||
d3d11->context->lpVtbl->RSSetScissorRects(d3d11->context, 1,
|
||||
&scissor_rect);
|
||||
}
|
||||
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
if (i == d3d11->shader_preset->passes - 1)
|
||||
context->lpVtbl->Draw(context, 4, 0);
|
||||
|
@ -3258,7 +3256,7 @@ static bool d3d11_gfx_frame(
|
|||
context->lpVtbl->VSSetConstantBuffers(context, 0, 1, &d3d11->frame.ubo);
|
||||
}
|
||||
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
if ( (video_info->shader_subframes > 1)
|
||||
&& (video_info->scan_subframes)
|
||||
&& !black_frame_insertion
|
||||
|
@ -3270,20 +3268,18 @@ static bool d3d11_gfx_frame(
|
|||
D3D11_RECT scissor_rect;
|
||||
|
||||
scissor_rect.left = 0;
|
||||
scissor_rect.top = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
scissor_rect.top = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
* (float)video_info->current_subframe);
|
||||
scissor_rect.right = video_width ;
|
||||
scissor_rect.bottom = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
scissor_rect.bottom = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
* (float)(video_info->current_subframe + 1));
|
||||
|
||||
d3d11->context->lpVtbl->RSSetScissorRects(d3d11->context, 1,
|
||||
&scissor_rect);
|
||||
}
|
||||
else
|
||||
{
|
||||
d3d11->context->lpVtbl->RSSetScissorRects(d3d11->context, 1, &d3d11->scissor);
|
||||
}
|
||||
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
context->lpVtbl->Draw(context, 4, 0);
|
||||
context->lpVtbl->RSSetState(context, d3d11->scissor_enabled);
|
||||
|
@ -3521,7 +3517,7 @@ static bool d3d11_gfx_frame(
|
|||
context->lpVtbl->ClearRenderTargetView(context, rtv, d3d11->clearcolor);
|
||||
DXGIPresent(d3d11->swapChain, d3d11->swap_interval, present_flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Frame duping for Shader Subframes, don't combine with swap_interval > 1, BFI.
|
||||
|
@ -3539,9 +3535,9 @@ static bool d3d11_gfx_frame(
|
|||
d3d11->flags |= D3D11_ST_FLAG_FRAME_DUPE_LOCK;
|
||||
for (k = 1; k < video_info->shader_subframes; k++)
|
||||
{
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
video_info->current_subframe = k;
|
||||
#endif // D3D11_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D11_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
if (d3d11->shader_preset)
|
||||
for (m = 0; m < d3d11->shader_preset->passes; m++)
|
||||
|
@ -3717,7 +3713,7 @@ static bool d3d11_gfx_read_viewport(void* data, uint8_t* buffer, bool is_idle)
|
|||
BackBufferResource->lpVtbl->Release(BackBufferResource);
|
||||
BackBufferStagingTexture->lpVtbl->Release(BackBufferStagingTexture);
|
||||
BackBuffer->lpVtbl->Release(BackBuffer);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -3204,7 +3204,7 @@ static void dx12_inject_black_frame(d3d12_video_t* d3d12)
|
|||
|
||||
d3d12->queue.allocator->lpVtbl->Reset(d3d12->queue.allocator);
|
||||
cmd->lpVtbl->Reset(cmd, d3d12->queue.allocator,
|
||||
d3d12->pipes[VIDEO_SHADER_STOCK_BLEND]);
|
||||
d3d12->pipes[VIDEO_SHADER_STOCK_BLEND]);
|
||||
|
||||
d3d12->chain.frame_index = DXGIGetCurrentBackBufferIndex(
|
||||
d3d12->chain.handle);
|
||||
|
@ -3595,7 +3595,7 @@ static bool d3d12_gfx_frame(
|
|||
|
||||
d3d12->pass[i].rotation = retroarch_get_rotation();
|
||||
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
Should always be 1 for non-use of subframes */
|
||||
if (!(d3d12->flags & D3D12_ST_FLAG_FRAME_DUPE_LOCK))
|
||||
{
|
||||
|
@ -3751,7 +3751,7 @@ static bool d3d12_gfx_frame(
|
|||
cmd->lpVtbl->RSSetViewports(cmd, 1,
|
||||
&d3d12->pass[i].viewport);
|
||||
|
||||
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
if ( (video_info->shader_subframes > 1)
|
||||
&& (video_info->scan_subframes)
|
||||
&& !black_frame_insertion
|
||||
|
@ -3763,20 +3763,20 @@ static bool d3d12_gfx_frame(
|
|||
D3D12_RECT scissor_rect;
|
||||
|
||||
scissor_rect.left = 0;
|
||||
scissor_rect.top = (unsigned int)(((float)d3d12->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
scissor_rect.top = (unsigned int)(((float)d3d12->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
* (float)video_info->current_subframe);
|
||||
scissor_rect.right = d3d12->pass[i].viewport.Width;
|
||||
scissor_rect.bottom = (unsigned int)(((float)d3d12->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
scissor_rect.bottom = (unsigned int)(((float)d3d12->pass[i].viewport.Height / (float)video_info->shader_subframes)
|
||||
* (float)(video_info->current_subframe + 1));
|
||||
|
||||
cmd->lpVtbl->RSSetScissorRects(cmd, 1, &scissor_rect);
|
||||
}
|
||||
else
|
||||
#endif // D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D12_ROLLING_SCANLINE_SIMULATION */
|
||||
{
|
||||
cmd->lpVtbl->RSSetScissorRects(cmd, 1,
|
||||
cmd->lpVtbl->RSSetScissorRects(cmd, 1,
|
||||
&d3d12->pass[i].scissorRect);
|
||||
}
|
||||
}
|
||||
|
||||
if (i == d3d12->shader_preset->passes - 1)
|
||||
start_vertex_location = 0;
|
||||
|
@ -3864,7 +3864,7 @@ static bool d3d12_gfx_frame(
|
|||
|
||||
cmd->lpVtbl->RSSetViewports(cmd, 1, &d3d12->frame.viewport);
|
||||
|
||||
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
if ( (video_info->shader_subframes > 1)
|
||||
&& (video_info->scan_subframes)
|
||||
&& !black_frame_insertion
|
||||
|
@ -3876,19 +3876,19 @@ static bool d3d12_gfx_frame(
|
|||
D3D12_RECT scissor_rect;
|
||||
|
||||
scissor_rect.left = 0;
|
||||
scissor_rect.top = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
scissor_rect.top = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
* (float)video_info->current_subframe);
|
||||
scissor_rect.right = video_width ;
|
||||
scissor_rect.bottom = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
scissor_rect.bottom = (unsigned int)(((float)video_height / (float)video_info->shader_subframes)
|
||||
* (float)(video_info->current_subframe + 1));
|
||||
|
||||
cmd->lpVtbl->RSSetScissorRects(cmd, 1, &scissor_rect);
|
||||
}
|
||||
else
|
||||
#endif // D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D12_ROLLING_SCANLINE_SIMULATION */
|
||||
{
|
||||
cmd->lpVtbl->RSSetScissorRects(cmd, 1, &d3d12->frame.scissorRect);
|
||||
}
|
||||
}
|
||||
|
||||
cmd->lpVtbl->DrawInstanced(cmd, 4, 1, 0, 0);
|
||||
|
||||
|
@ -4098,9 +4098,9 @@ static bool d3d12_gfx_frame(
|
|||
d3d12->flags |= D3D12_ST_FLAG_FRAME_DUPE_LOCK;
|
||||
for (k = 1; k < video_info->shader_subframes; k++)
|
||||
{
|
||||
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
video_info->current_subframe = k;
|
||||
#endif // D3D12_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* D3D12_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
if (d3d12->shader_preset)
|
||||
for (m = 0; m < d3d12->shader_preset->passes; m++)
|
||||
|
|
|
@ -4635,8 +4635,8 @@ static bool gl2_alive(void *data)
|
|||
#ifdef __WINRT__
|
||||
if (is_running_on_xbox())
|
||||
{
|
||||
//match the output res to the display res
|
||||
temp_width = uwp_get_width();
|
||||
/* Match the output res to the display resolution */
|
||||
temp_width = uwp_get_width();
|
||||
temp_height = uwp_get_height();
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -2160,8 +2160,11 @@ static bool gl3_alive(void *data)
|
|||
#ifdef __WINRT__
|
||||
if (is_running_on_xbox())
|
||||
{
|
||||
//we can set it to 1920x1080 as xbox uwp windowsize is guaranteed to be 1920x1080 and currently there is now way to set angle to use a variable resolution swapchain so regardless of the size the window is always 1080p
|
||||
temp_width = 1920;
|
||||
/* We can set it to 1920x1080 as xbox uwp windowsize is guaranteed
|
||||
* to be 1920x1080 and currently there is now way to set ANGLE to
|
||||
* use a variable resolution swapchain so regardless of the size
|
||||
* the window is always 1080p */
|
||||
temp_width = 1920;
|
||||
temp_height = 1080;
|
||||
}
|
||||
#endif
|
||||
|
@ -2582,16 +2585,12 @@ static bool gl3_frame(void *data, const void *frame,
|
|||
&& !video_info->runloop_is_slowmotion
|
||||
&& !video_info->runloop_is_paused
|
||||
&& (!(gl->flags & GL3_FLAG_MENU_TEXTURE_ENABLE)))
|
||||
{
|
||||
gl3_filter_chain_set_simulate_scanline(
|
||||
gl->filter_chain, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl3_filter_chain_set_simulate_scanline(
|
||||
gl->filter_chain, false);
|
||||
}
|
||||
#endif // GL3_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* GL3_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
gl3_filter_chain_set_input_texture(gl->filter_chain, &texture);
|
||||
gl3_filter_chain_build_offscreen_passes(gl->filter_chain,
|
||||
|
|
|
@ -3825,8 +3825,6 @@ static void vulkan_set_video_mode(void *data,
|
|||
static void vulkan_set_viewport(void *data, unsigned viewport_width,
|
||||
unsigned viewport_height, bool force_full, bool allow_rotate)
|
||||
{
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
float device_aspect = (float)viewport_width / viewport_height;
|
||||
struct video_ortho ortho = {0, 1, 0, 1, -1, 1};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
@ -3849,7 +3847,8 @@ static void vulkan_set_viewport(void *data, unsigned viewport_width,
|
|||
}
|
||||
else if ((vk->flags & VK_FLAG_KEEP_ASPECT) && !force_full)
|
||||
{
|
||||
video_viewport_get_scaled_aspect2(&vk->vp, viewport_width, viewport_height, true, device_aspect, video_driver_get_aspect_ratio());
|
||||
video_viewport_get_scaled_aspect2(&vk->vp, viewport_width, viewport_height,
|
||||
true, device_aspect, video_driver_get_aspect_ratio());
|
||||
viewport_width = vk->vp.width;
|
||||
viewport_height = vk->vp.height;
|
||||
}
|
||||
|
@ -4522,7 +4521,7 @@ static bool vulkan_frame(void *data, const void *frame,
|
|||
vulkan_filter_chain_set_frame_count(
|
||||
(vulkan_filter_chain_t*)vk->filter_chain, frame_count);
|
||||
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
/* Sub-frame info for multiframe shaders (per real content frame).
|
||||
Should always be 1 for non-use of subframes*/
|
||||
if (!(vk->context->flags & VK_CTX_FLAG_SWAP_INTERVAL_EMULATION_LOCK))
|
||||
{
|
||||
|
@ -4552,16 +4551,12 @@ static bool vulkan_frame(void *data, const void *frame,
|
|||
&& !runloop_is_paused
|
||||
&& (!(vk->flags & VK_FLAG_MENU_ENABLE))
|
||||
&& !(vk->context->swap_interval > 1))
|
||||
{
|
||||
vulkan_filter_chain_set_simulate_scanline(
|
||||
(vulkan_filter_chain_t*)vk->filter_chain, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
vulkan_filter_chain_set_simulate_scanline(
|
||||
(vulkan_filter_chain_t*)vk->filter_chain, false);
|
||||
}
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
#ifdef HAVE_REWIND
|
||||
vulkan_filter_chain_set_frame_direction(
|
||||
|
|
|
@ -512,9 +512,9 @@ class Pass
|
|||
cache(cache),
|
||||
num_sync_indices(num_sync_indices),
|
||||
final_pass(final_pass)
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
,simulate_scanline(false)
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
{}
|
||||
|
||||
~Pass();
|
||||
|
@ -551,14 +551,14 @@ class Pass
|
|||
void set_frame_count_period(unsigned p) { frame_count_period = p; }
|
||||
void set_shader_subframes(uint32_t ts) { total_subframes = ts; }
|
||||
void set_current_shader_subframe(uint32_t cs) { current_subframe = cs; }
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
void set_simulate_scanline(bool simulate) { simulate_scanline = simulate; }
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
void set_frame_direction(int32_t dir) { frame_direction = dir; }
|
||||
void set_rotation(uint32_t rot) { rotation = rot; }
|
||||
void set_name(const char *name) { pass_name = name; }
|
||||
const std::string &get_name() const { return pass_name; }
|
||||
glslang_filter_chain_filter get_source_filter() const {
|
||||
glslang_filter_chain_filter get_source_filter() const {
|
||||
return pass_info.source_filter; }
|
||||
|
||||
glslang_filter_chain_filter get_mip_filter() const
|
||||
|
@ -587,9 +587,9 @@ class Pass
|
|||
unsigned num_sync_indices;
|
||||
unsigned sync_index;
|
||||
bool final_pass;
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
bool simulate_scanline;
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
Size2D get_output_size(const Size2D &original_size,
|
||||
const Size2D &max_source) const;
|
||||
|
@ -708,9 +708,9 @@ struct vulkan_filter_chain
|
|||
void set_frame_count_period(unsigned pass, unsigned period);
|
||||
void set_shader_subframes(uint32_t total_subframes);
|
||||
void set_current_shader_subframe(uint32_t current_subframe);
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#ifdef VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
void set_simulate_scanline(bool simulate_scanline);
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
void set_frame_direction(int32_t direction);
|
||||
void set_rotation(uint32_t rot);
|
||||
void set_pass_name(unsigned pass, const char *name);
|
||||
|
@ -878,7 +878,7 @@ static std::unique_ptr<StaticTexture> vulkan_filter_chain_load_lut(
|
|||
image_info.extent.width = image.width;
|
||||
image_info.extent.height = image.height;
|
||||
image_info.extent.depth = 1;
|
||||
image_info.mipLevels = shader->mipmap
|
||||
image_info.mipLevels = shader->mipmap
|
||||
? glslang_num_miplevels(image.width, image.height) : 1;
|
||||
image_info.arrayLayers = 1;
|
||||
image_info.samples = VK_SAMPLE_COUNT_1_BIT;
|
||||
|
@ -926,7 +926,7 @@ static std::unique_ptr<StaticTexture> vulkan_filter_chain_load_lut(
|
|||
view_info.subresourceRange.layerCount = 1;
|
||||
vkCreateImageView(info->device, &view_info, nullptr, &view);
|
||||
|
||||
buffer =
|
||||
buffer =
|
||||
std::unique_ptr<Buffer>(new Buffer(info->device, *info->memory_properties,
|
||||
image.width * image.height * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT));
|
||||
ptr = buffer->map();
|
||||
|
@ -937,8 +937,8 @@ static std::unique_ptr<StaticTexture> vulkan_filter_chain_load_lut(
|
|||
tex,
|
||||
VK_REMAINING_MIP_LEVELS,
|
||||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
shader->mipmap
|
||||
? VK_IMAGE_LAYOUT_GENERAL
|
||||
shader->mipmap
|
||||
? VK_IMAGE_LAYOUT_GENERAL
|
||||
: VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
0,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
|
@ -965,8 +965,8 @@ static std::unique_ptr<StaticTexture> vulkan_filter_chain_load_lut(
|
|||
vkCmdCopyBufferToImage(cmd,
|
||||
buffer->get_buffer(),
|
||||
tex,
|
||||
shader->mipmap
|
||||
? VK_IMAGE_LAYOUT_GENERAL
|
||||
shader->mipmap
|
||||
? VK_IMAGE_LAYOUT_GENERAL
|
||||
: VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
1, ®ion);
|
||||
|
||||
|
@ -1022,8 +1022,8 @@ static std::unique_ptr<StaticTexture> vulkan_filter_chain_load_lut(
|
|||
cmd,
|
||||
tex,
|
||||
VK_REMAINING_MIP_LEVELS,
|
||||
shader->mipmap
|
||||
? VK_IMAGE_LAYOUT_GENERAL
|
||||
shader->mipmap
|
||||
? VK_IMAGE_LAYOUT_GENERAL
|
||||
: VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
|
||||
VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL,
|
||||
VK_ACCESS_TRANSFER_WRITE_BIT,
|
||||
|
@ -1080,7 +1080,7 @@ static bool vulkan_filter_chain_load_luts(
|
|||
|
||||
for (i = 0; i < shader->luts; i++)
|
||||
{
|
||||
std::unique_ptr<StaticTexture> image =
|
||||
std::unique_ptr<StaticTexture> image =
|
||||
vulkan_filter_chain_load_lut(cmd, info, chain, &shader->lut[i]);
|
||||
if (!image)
|
||||
{
|
||||
|
@ -1244,7 +1244,7 @@ void vulkan_filter_chain::build_offscreen_passes(VkCommandBuffer cmd,
|
|||
unsigned i;
|
||||
Texture source;
|
||||
|
||||
/* First frame, make sure our history and feedback textures
|
||||
/* First frame, make sure our history and feedback textures
|
||||
* are in a clean state. */
|
||||
if (require_clear)
|
||||
{
|
||||
|
@ -1312,7 +1312,7 @@ void vulkan_filter_chain::update_history(DeferredDisposer &disposer,
|
|||
|
||||
if ( input_texture.width != tmp->get_size().width
|
||||
|| input_texture.height != tmp->get_size().height
|
||||
|| (input_texture.format != VK_FORMAT_UNDEFINED
|
||||
|| (input_texture.format != VK_FORMAT_UNDEFINED
|
||||
&& input_texture.format != tmp->get_format()))
|
||||
tmp->set_size(disposer, { input_texture.width, input_texture.height }, input_texture.format);
|
||||
|
||||
|
@ -1358,7 +1358,7 @@ void vulkan_filter_chain::build_viewport_pass(
|
|||
unsigned i;
|
||||
Texture source;
|
||||
|
||||
/* First frame, make sure our history and
|
||||
/* First frame, make sure our history and
|
||||
* feedback textures are in a clean state. */
|
||||
if (require_clear)
|
||||
{
|
||||
|
@ -1496,7 +1496,7 @@ bool vulkan_filter_chain::init_feedback()
|
|||
bool vulkan_filter_chain::init_alias()
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
common.texture_semantic_map.clear();
|
||||
common.texture_semantic_uniform_map.clear();
|
||||
|
||||
|
@ -1619,7 +1619,7 @@ bool vulkan_filter_chain::init_ubo()
|
|||
for (i = 0; i < passes.size(); i++)
|
||||
passes[i]->allocate_buffers();
|
||||
|
||||
common.ubo_offset =
|
||||
common.ubo_offset =
|
||||
(common.ubo_offset + common.ubo_alignment - 1) &
|
||||
~(common.ubo_alignment - 1);
|
||||
common.ubo_sync_index_stride = common.ubo_offset;
|
||||
|
@ -1726,7 +1726,7 @@ void vulkan_filter_chain::set_simulate_scanline(bool simulate_scanline)
|
|||
for (i = 0; i < passes.size(); i++)
|
||||
passes[i]->set_simulate_scanline(simulate_scanline);
|
||||
}
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
void vulkan_filter_chain::set_frame_direction(int32_t direction)
|
||||
{
|
||||
|
@ -2230,7 +2230,7 @@ bool Pass::init_pipeline()
|
|||
pipe.pColorBlendState = &blend;
|
||||
pipe.pDynamicState = &dynamic;
|
||||
pipe.layout = pipeline_layout;
|
||||
pipe.renderPass = final_pass
|
||||
pipe.renderPass = final_pass
|
||||
? swapchain_render_pass
|
||||
: framebuffer->get_render_pass();
|
||||
pipe.subpass = 0;
|
||||
|
@ -2275,7 +2275,7 @@ CommonResources::CommonResources(VkDevice device,
|
|||
1.0f, +1.0f, 1.0f, 1.0f,
|
||||
};
|
||||
|
||||
vbo =
|
||||
vbo =
|
||||
std::unique_ptr<Buffer>(new Buffer(device,
|
||||
memory_properties, sizeof(vbo_data), VK_BUFFER_USAGE_VERTEX_BUFFER_BIT));
|
||||
|
||||
|
@ -2629,8 +2629,8 @@ void Pass::build_semantics(VkDescriptorSet set, uint8_t *buffer,
|
|||
unsigned(current_viewport.height));
|
||||
|
||||
build_semantic_uint(buffer, SLANG_SEMANTIC_FRAME_COUNT,
|
||||
frame_count_period
|
||||
? uint32_t(frame_count % frame_count_period)
|
||||
frame_count_period
|
||||
? uint32_t(frame_count % frame_count_period)
|
||||
: uint32_t(frame_count));
|
||||
|
||||
build_semantic_int(buffer, SLANG_SEMANTIC_FRAME_DIRECTION,
|
||||
|
@ -2737,7 +2737,7 @@ void Pass::build_commands(
|
|||
VK_IMAGE_LAYOUT_UNDEFINED,
|
||||
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
|
||||
0,
|
||||
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
|
||||
VK_ACCESS_COLOR_ATTACHMENT_READ_BIT |
|
||||
VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
|
||||
VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
|
||||
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
|
||||
|
@ -2787,7 +2787,7 @@ void Pass::build_commands(
|
|||
const VkRect2D sci = {
|
||||
{
|
||||
int32_t(current_viewport.x),
|
||||
int32_t((current_viewport.height / float(total_subframes))
|
||||
int32_t((current_viewport.height / float(total_subframes))
|
||||
* float(current_subframe - 1))
|
||||
},
|
||||
{
|
||||
|
@ -2798,7 +2798,7 @@ void Pass::build_commands(
|
|||
vkCmdSetScissor(cmd, 0, 1, &sci);
|
||||
}
|
||||
else
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
{
|
||||
const VkRect2D sci = {
|
||||
{
|
||||
|
@ -2811,7 +2811,7 @@ void Pass::build_commands(
|
|||
},
|
||||
};
|
||||
vkCmdSetScissor(cmd, 0, 1, &sci);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2830,7 +2830,7 @@ void Pass::build_commands(
|
|||
const VkRect2D sci = {
|
||||
{
|
||||
0,
|
||||
int32_t((float(current_framebuffer_size.height) / float(total_subframes))
|
||||
int32_t((float(current_framebuffer_size.height) / float(total_subframes))
|
||||
* float(current_subframe - 1))
|
||||
},
|
||||
{
|
||||
|
@ -2841,7 +2841,7 @@ void Pass::build_commands(
|
|||
vkCmdSetScissor(cmd, 0, 1, &sci);
|
||||
}
|
||||
else
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
{
|
||||
const VkRect2D sci = {
|
||||
{ 0, 0 },
|
||||
|
@ -2851,7 +2851,7 @@ void Pass::build_commands(
|
|||
},
|
||||
};
|
||||
vkCmdSetScissor(cmd, 0, 1, &sci);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
vkCmdDraw(cmd, 4, 1, 0, 0);
|
||||
|
@ -3220,8 +3220,8 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
|
|||
else
|
||||
{
|
||||
pass_info.source_filter =
|
||||
pass->filter == RARCH_FILTER_LINEAR
|
||||
? GLSLANG_FILTER_CHAIN_LINEAR
|
||||
pass->filter == RARCH_FILTER_LINEAR
|
||||
? GLSLANG_FILTER_CHAIN_LINEAR
|
||||
: GLSLANG_FILTER_CHAIN_NEAREST;
|
||||
}
|
||||
pass_info.address = rarch_wrap_to_address(pass->wrap);
|
||||
|
@ -3234,9 +3234,9 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset(
|
|||
if (next_pass && next_pass->mipmap)
|
||||
pass_info.max_levels = ~0u;
|
||||
|
||||
pass_info.mip_filter =
|
||||
pass_info.mip_filter =
|
||||
(pass->filter != RARCH_FILTER_NEAREST && pass_info.max_levels > 1)
|
||||
? GLSLANG_FILTER_CHAIN_LINEAR
|
||||
? GLSLANG_FILTER_CHAIN_LINEAR
|
||||
: GLSLANG_FILTER_CHAIN_NEAREST;
|
||||
|
||||
bool explicit_format = output.meta.rt_format != SLANG_FORMAT_UNKNOWN;
|
||||
|
@ -3473,7 +3473,7 @@ void vulkan_filter_chain_set_simulate_scanline(
|
|||
{
|
||||
chain->set_simulate_scanline(simulate_scanline);
|
||||
}
|
||||
#endif // VULKAN_ROLLING_SCANLINE_SIMULATION
|
||||
#endif /* VULKAN_ROLLING_SCANLINE_SIMULATION */
|
||||
|
||||
void vulkan_filter_chain_set_frame_direction(
|
||||
vulkan_filter_chain_t *chain,
|
||||
|
|
Loading…
Reference in New Issue