mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
implement FrameDirection slang semantic for d3d10,11,12
This commit is contained in:
parent
95546b51d7
commit
b54ad4d67f
@ -1208,6 +1208,7 @@ typedef struct
|
||||
D3D10_VIEWPORT viewport;
|
||||
pass_semantics_t semantics;
|
||||
uint32_t frame_count;
|
||||
int32_t frame_direction;
|
||||
} pass[GFX_MAX_SHADERS];
|
||||
|
||||
struct video_shader* shader_preset;
|
||||
|
@ -2584,6 +2584,7 @@ typedef struct
|
||||
D3D11_VIEWPORT viewport;
|
||||
pass_semantics_t semantics;
|
||||
uint32_t frame_count;
|
||||
int32_t frame_direction;
|
||||
} pass[GFX_MAX_SHADERS];
|
||||
|
||||
struct video_shader* shader_preset;
|
||||
|
@ -1444,6 +1444,7 @@ typedef struct
|
||||
D3D12_RECT scissorRect;
|
||||
pass_semantics_t semantics;
|
||||
uint32_t frame_count;
|
||||
int32_t frame_direction;
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE textures;
|
||||
D3D12_GPU_DESCRIPTOR_HANDLE samplers;
|
||||
} pass[GFX_MAX_SHADERS];
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../managers/state_manager.h"
|
||||
|
||||
#include "../video_driver.h"
|
||||
#include "../font_driver.h"
|
||||
@ -390,10 +391,11 @@ static bool d3d10_gfx_set_shader(void* data,
|
||||
&d3d10->luts[0].size_data, sizeof(*d3d10->luts)},
|
||||
},
|
||||
{
|
||||
&d3d10->mvp, /* MVP */
|
||||
&d3d10->pass[i].rt.size_data, /* OutputSize */
|
||||
&d3d10->frame.output_size, /* FinalViewportSize */
|
||||
&d3d10->pass[i].frame_count, /* FrameCount */
|
||||
&d3d10->mvp, /* MVP */
|
||||
&d3d10->pass[i].rt.size_data, /* OutputSize */
|
||||
&d3d10->frame.output_size, /* FinalViewportSize */
|
||||
&d3d10->pass[i].frame_count, /* FrameCount */
|
||||
&d3d10->pass[i].frame_direction, /* FrameDirection */
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
@ -1283,6 +1285,8 @@ static bool d3d10_gfx_frame(
|
||||
else
|
||||
d3d10->pass[i].frame_count = frame_count;
|
||||
|
||||
d3d10->pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1;
|
||||
|
||||
for (j = 0; j < SLANG_CBUFFER_MAX; j++)
|
||||
{
|
||||
D3D10Buffer buffer = d3d10->pass[i].buffers[j];
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "../../menu/menu_driver.h"
|
||||
#include "../video_shader_parse.h"
|
||||
#include "../drivers_shader/slang_preprocess.h"
|
||||
#include "../../managers/state_manager.h"
|
||||
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../common/d3d11_common.h"
|
||||
@ -408,10 +409,11 @@ static bool d3d11_gfx_set_shader(void* data, enum rarch_shader_type type, const
|
||||
&d3d11->luts[0].size_data, sizeof(*d3d11->luts)},
|
||||
},
|
||||
{
|
||||
&d3d11->mvp, /* MVP */
|
||||
&d3d11->pass[i].rt.size_data, /* OutputSize */
|
||||
&d3d11->frame.output_size, /* FinalViewportSize */
|
||||
&d3d11->pass[i].frame_count, /* FrameCount */
|
||||
&d3d11->mvp, /* MVP */
|
||||
&d3d11->pass[i].rt.size_data, /* OutputSize */
|
||||
&d3d11->frame.output_size, /* FinalViewportSize */
|
||||
&d3d11->pass[i].frame_count, /* FrameCount */
|
||||
&d3d11->pass[i].frame_direction, /* FrameDirection */
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
@ -1356,6 +1358,8 @@ static bool d3d11_gfx_frame(
|
||||
else
|
||||
d3d11->pass[i].frame_count = frame_count;
|
||||
|
||||
d3d11->pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1;
|
||||
|
||||
for (j = 0; j < SLANG_CBUFFER_MAX; j++)
|
||||
{
|
||||
D3D11Buffer buffer = d3d11->pass[i].buffers[j];
|
||||
|
@ -32,6 +32,7 @@
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../managers/state_manager.h"
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#include "../../menu/menu_driver.h"
|
||||
@ -398,10 +399,11 @@ static bool d3d12_gfx_set_shader(void* data, enum rarch_shader_type type, const
|
||||
&d3d12->luts[0].size_data, sizeof(*d3d12->luts)},
|
||||
},
|
||||
{
|
||||
&d3d12->mvp, /* MVP */
|
||||
&d3d12->pass[i].rt.size_data, /* OutputSize */
|
||||
&d3d12->frame.output_size, /* FinalViewportSize */
|
||||
&d3d12->pass[i].frame_count, /* FrameCount */
|
||||
&d3d12->mvp, /* MVP */
|
||||
&d3d12->pass[i].rt.size_data, /* OutputSize */
|
||||
&d3d12->frame.output_size, /* FinalViewportSize */
|
||||
&d3d12->pass[i].frame_count, /* FrameCount */
|
||||
&d3d12->pass[i].frame_direction, /* FrameDirection */
|
||||
}
|
||||
};
|
||||
/* clang-format on */
|
||||
@ -1294,6 +1296,8 @@ static bool d3d12_gfx_frame(
|
||||
else
|
||||
d3d12->pass[i].frame_count = frame_count;
|
||||
|
||||
d3d12->pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1;
|
||||
|
||||
for (j = 0; j < SLANG_CBUFFER_MAX; j++)
|
||||
{
|
||||
cbuffer_sem_t* buffer_sem = &d3d12->pass[i].semantics.cbuffers[j];
|
||||
|
Loading…
x
Reference in New Issue
Block a user