mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
Set handles_transform for 3DS/D3D11/D3D12/Vita/WiiU menu
display drivers - this skips a bunch of costly matrix calculations for menu display drivers that have a geometry shader or something similar
This commit is contained in:
parent
f0f3df3043
commit
18d27468ae
@ -101,4 +101,5 @@ menu_display_ctx_driver_t menu_display_ctx_caca = {
|
||||
menu_display_caca_font_init_first,
|
||||
MENU_VIDEO_DRIVER_CACA,
|
||||
"menu_display_caca",
|
||||
false
|
||||
};
|
||||
|
@ -208,4 +208,5 @@ menu_display_ctx_driver_t menu_display_ctx_ctr = {
|
||||
menu_display_ctr_font_init_first,
|
||||
MENU_VIDEO_DRIVER_CTR,
|
||||
"menu_display_ctr",
|
||||
true
|
||||
};
|
||||
|
@ -325,4 +325,5 @@ menu_display_ctx_driver_t menu_display_ctx_d3d = {
|
||||
menu_display_d3d_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D,
|
||||
"menu_display_d3d",
|
||||
false
|
||||
};
|
||||
|
@ -285,4 +285,5 @@ menu_display_ctx_driver_t menu_display_ctx_d3d11 = {
|
||||
menu_display_d3d11_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D11,
|
||||
"menu_display_d3d11",
|
||||
true
|
||||
};
|
||||
|
@ -308,4 +308,5 @@ menu_display_ctx_driver_t menu_display_ctx_d3d12 = {
|
||||
menu_display_d3d12_font_init_first,
|
||||
MENU_VIDEO_DRIVER_DIRECT3D12,
|
||||
"menu_display_d3d12",
|
||||
true
|
||||
};
|
||||
|
@ -122,4 +122,5 @@ menu_display_ctx_driver_t menu_display_ctx_gdi = {
|
||||
menu_display_gdi_font_init_first,
|
||||
MENU_VIDEO_DRIVER_GDI,
|
||||
"menu_display_gdi",
|
||||
false
|
||||
};
|
||||
|
@ -274,4 +274,5 @@ menu_display_ctx_driver_t menu_display_ctx_gl = {
|
||||
menu_display_gl_font_init_first,
|
||||
MENU_VIDEO_DRIVER_OPENGL,
|
||||
"menu_display_gl",
|
||||
false
|
||||
};
|
||||
|
@ -97,4 +97,5 @@ menu_display_ctx_driver_t menu_display_ctx_null = {
|
||||
menu_display_null_font_init_first,
|
||||
MENU_VIDEO_DRIVER_GENERIC,
|
||||
"menu_display_null",
|
||||
false
|
||||
};
|
||||
|
@ -102,4 +102,5 @@ menu_display_ctx_driver_t menu_display_ctx_vga = {
|
||||
menu_display_vga_font_init_first,
|
||||
MENU_VIDEO_DRIVER_VGA,
|
||||
"menu_display_vga",
|
||||
false
|
||||
};
|
||||
|
@ -255,4 +255,5 @@ menu_display_ctx_driver_t menu_display_ctx_vita2d = {
|
||||
menu_display_vita2d_font_init_first,
|
||||
MENU_VIDEO_DRIVER_VITA2D,
|
||||
"menu_display_vita2d",
|
||||
true
|
||||
};
|
||||
|
@ -360,4 +360,5 @@ menu_display_ctx_driver_t menu_display_ctx_vulkan = {
|
||||
menu_display_vk_font_init_first,
|
||||
MENU_VIDEO_DRIVER_VULKAN,
|
||||
"menu_display_vulkan",
|
||||
false
|
||||
};
|
||||
|
@ -340,4 +340,5 @@ menu_display_ctx_driver_t menu_display_ctx_wiiu = {
|
||||
menu_display_wiiu_font_init_first,
|
||||
MENU_VIDEO_DRIVER_WIIU,
|
||||
"menu_display_wiiu",
|
||||
true
|
||||
};
|
||||
|
@ -1015,11 +1015,15 @@ void menu_display_draw_texture_slice(
|
||||
void menu_display_rotate_z(menu_display_ctx_rotate_draw_t *draw,
|
||||
video_frame_info_t *video_info)
|
||||
{
|
||||
#if !defined(VITA) && !defined(_3DS) && !defined(WIIU)
|
||||
math_matrix_4x4 matrix_rotated, matrix_scaled;
|
||||
math_matrix_4x4 *b = NULL;
|
||||
|
||||
if (!draw || !menu_disp || !menu_disp->get_default_mvp)
|
||||
if (
|
||||
!draw ||
|
||||
!menu_disp ||
|
||||
!menu_disp->get_default_mvp ||
|
||||
menu_disp->handles_transform
|
||||
)
|
||||
return;
|
||||
|
||||
b = (math_matrix_4x4*)menu_disp->get_default_mvp(video_info);
|
||||
@ -1036,7 +1040,6 @@ void menu_display_rotate_z(menu_display_ctx_rotate_draw_t *draw,
|
||||
matrix_4x4_scale(matrix_scaled,
|
||||
draw->scale_x, draw->scale_y, draw->scale_z);
|
||||
matrix_4x4_multiply(*draw->matrix, matrix_scaled, *draw->matrix);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool menu_display_get_tex_coords(menu_display_ctx_coord_draw_t *draw)
|
||||
|
@ -346,6 +346,7 @@ typedef struct menu_display_ctx_driver
|
||||
bool is_threaded);
|
||||
enum menu_display_driver_type type;
|
||||
const char *ident;
|
||||
bool handles_transform;
|
||||
} menu_display_ctx_driver_t;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user