Skip to content

Commit 2d2cb04

Browse files
committed
Merge video_coord_array.c into video_driver.c
1 parent 40a0ced commit 2d2cb04

19 files changed

+1590
-1652
lines changed

Makefile.common

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,6 @@ OBJ += \
321321
gfx/gfx_animation.o \
322322
gfx/gfx_thumbnail_path.o \
323323
gfx/gfx_thumbnail.o \
324-
gfx/video_coord_array.o \
325324
configuration.o \
326325
$(LIBRETRO_COMM_DIR)/dynamic/dylib.o \
327326
cores/dynamic_dummy.o \

gfx/common/gl2_common.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include <formats/image.h>
3333

3434
#include "../video_driver.h"
35-
#include "../video_coord_array.h"
3635

3736
RETRO_BEGIN_DECLS
3837

gfx/common/gl3_defines.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
#include <formats/image.h>
3434

3535
#include "../video_driver.h"
36-
#include "../video_coord_array.h"
3736
#include "../drivers_shader/shader_gl3.h"
3837

3938
RETRO_BEGIN_DECLS

gfx/common/rsx_defines.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131

3232
#include "../../driver.h"
3333
#include "../../retroarch.h"
34-
#include "../video_coord_array.h"
3534

3635
#define RSX_MAX_BUFFERS 2
3736
#define RSX_MAX_MENU_BUFFERS 2

gfx/common/vita2d_defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
#include <gfx/math/matrix_4x4.h>
2525

2626
#include <defines/psp_defines.h>
27+
2728
#include "../../driver.h"
2829
#include "../../retroarch.h"
29-
#include "../video_coord_array.h"
3030

3131
typedef struct vita_menu_frame
3232
{

gfx/drivers/d3d8.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
#include <defines/d3d_defines.h>
4242
#include "../common/d3d8_defines.h"
4343
#include "../common/d3d_common.h"
44-
#include "../video_coord_array.h"
4544
#include "../../configuration.h"
4645
#include "../../retroarch.h"
4746
#include "../../dynamic.h"
@@ -378,7 +377,7 @@ static void d3d8_blit_to_texture(
378377
D3DLOCKED_RECT d3dlr;
379378
D3DLOCKED_RECT *lr = &d3dlr;
380379
LPDIRECT3DDEVICE8 d3dr = (LPDIRECT3DDEVICE8)chain->dev;
381-
LPDIRECT3DTEXTURE8 tex = (LPDIRECT3DTEXTURE8)chain->tex;
380+
LPDIRECT3DTEXTURE8 tex = (LPDIRECT3DTEXTURE8)chain->tex;
382381
#ifdef _XBOX
383382
global_t *global = global_get_ptr();
384383
D3DDevice_SetFlickerFilter(global->console.screen.flicker_filter_index);
@@ -483,8 +482,8 @@ static bool d3d8_setup_init(void *data,
483482
video_driver_get_size(&width, &height);
484483

485484
chain->dev = dev_data;
486-
chain->pixel_size = (fmt == RETRO_PIXEL_FORMAT_RGB565)
487-
? 2
485+
chain->pixel_size = (fmt == RETRO_PIXEL_FORMAT_RGB565)
486+
? 2
488487
: 4;
489488
chain->tex_w = link_info->tex_w;
490489
chain->tex_h = link_info->tex_h;
@@ -553,7 +552,7 @@ static void *gfx_display_d3d8_get_default_mvp(void *data)
553552
{
554553
static float id[16] = { 1.0f, 0.0f, 0.0f, 0.0f,
555554
0.0f, 1.0f, 0.0f, 0.0f,
556-
0.0f, 0.0f, 1.0f, 0.0f,
555+
0.0f, 0.0f, 1.0f, 0.0f,
557556
0.0f, 0.0f, 0.0f, 1.0f
558557
};
559558
return &id;
@@ -600,12 +599,12 @@ static void gfx_display_d3d8_blend_end(void *data)
600599

601600
static void gfx_display_d3d8_draw(gfx_display_ctx_draw_t *draw,
602601
void *data,
603-
unsigned video_width,
602+
unsigned video_width,
604603
unsigned video_height)
605604
{
606605
static float default_mvp[] ={ 1.0f, 0.0f, 0.0f, 0.0f,
607606
0.0f, 1.0f, 0.0f, 0.0f,
608-
0.0f, 0.0f, 1.0f, 0.0f,
607+
0.0f, 0.0f, 1.0f, 0.0f,
609608
0.0f, 0.0f, 0.0f, 1.0f
610609
};
611610
unsigned i;
@@ -1912,7 +1911,7 @@ static bool d3d8_frame(void *data, const void *frame,
19121911
if (black_frame_insertion && !d3d->menu->enabled)
19131912
{
19141913
unsigned n;
1915-
for (n = 0; n < video_info->black_frame_insertion; ++n)
1914+
for (n = 0; n < video_info->black_frame_insertion; ++n)
19161915
{
19171916
if (IDirect3DDevice8_Present(d3d->dev, NULL, NULL, NULL, NULL)
19181917
== D3DERR_DEVICELOST)

gfx/drivers/d3d9cg.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
#include "../common/d3d9_common.h"
4949
#include "../include/Cg/cg.h"
5050
#include "../include/Cg/cgD3D9.h"
51-
#include "../video_coord_array.h"
51+
#include "../video_driver.h"
5252
#include "../../configuration.h"
5353
#include "../../dynamic.h"
5454
#include "../../frontend/frontend_driver.h"
@@ -133,7 +133,7 @@ static void *gfx_display_d3d9_cg_get_default_mvp(void *data)
133133
{
134134
static float id[16] = { 1.0f, 0.0f, 0.0f, 0.0f,
135135
0.0f, 1.0f, 0.0f, 0.0f,
136-
0.0f, 0.0f, 1.0f, 0.0f,
136+
0.0f, 0.0f, 1.0f, 0.0f,
137137
0.0f, 0.0f, 0.0f, 1.0f
138138
};
139139
return &id;
@@ -263,7 +263,7 @@ static void gfx_display_d3d9_cg_draw(gfx_display_ctx_draw_t *draw,
263263
matrix_4x4_multiply(m1, mop, m2);
264264
matrix_4x4_multiply(m2, d3d->mvp_transposed, m1);
265265
d3d_matrix_transpose(&m1, &m2);
266-
266+
267267
IDirect3DDevice9_SetVertexShaderConstantF(dev,
268268
0, (const float*)&m1, 4);
269269

@@ -1657,8 +1657,8 @@ static bool d3d9_cg_init_chain(d3d9_video_t *d3d,
16571657
if (!d3d9_renderchain_add_lut(
16581658
d3d->renderchain_data,
16591659
d3d->shader.lut[i].id, d3d->shader.lut[i].path,
1660-
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC
1661-
? video_smooth
1660+
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC
1661+
? video_smooth
16621662
: (d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR)))
16631663
{
16641664
RARCH_ERR("[D3D9]: Failed to init LUTs.\n");
@@ -1905,7 +1905,7 @@ static bool d3d9_cg_init_internal(d3d9_video_t *d3d,
19051905

19061906
d3d9_cg_fake_context.get_flags = d3d9_cg_get_flags;
19071907
d3d9_cg_fake_context.get_metrics = win32_get_metrics;
1908-
video_context_driver_set(&d3d9_cg_fake_context);
1908+
video_context_driver_set(&d3d9_cg_fake_context);
19091909
{
19101910
const char *shader_preset = video_shader_get_current_shader_preset();
19111911
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
@@ -2087,20 +2087,20 @@ static bool d3d9_cg_frame(void *data, const void *frame,
20872087
d3d9_cg_renderchain_render(
20882088
d3d, frame, frame_width, frame_height,
20892089
pitch, d3d->dev_rotation);
2090-
2090+
20912091
if (black_frame_insertion && !d3d->menu->enabled)
20922092
{
20932093
int n;
2094-
for (n = 0; n < video_info->black_frame_insertion; ++n)
2095-
{
2094+
for (n = 0; n < video_info->black_frame_insertion; ++n)
2095+
{
20962096
bool ret = (IDirect3DDevice9_Present(d3d->dev,
20972097
NULL, NULL, NULL, NULL) != D3DERR_DEVICELOST);
20982098
if (!ret || d3d->needs_restore)
20992099
return true;
21002100
IDirect3DDevice9_Clear(d3d->dev, 0, 0, D3DCLEAR_TARGET,
21012101
0, 1, 0);
21022102
}
2103-
}
2103+
}
21042104

21052105
#ifdef HAVE_OVERLAY
21062106
if (d3d->overlays_enabled && overlay_behind_menu)

gfx/drivers/d3d9hlsl.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include <defines/d3d_defines.h>
5555
#include "../common/d3d_common.h"
5656
#include "../common/d3d9_common.h"
57-
#include "../video_coord_array.h"
57+
#include "../video_driver.h"
5858
#include "../../configuration.h"
5959
#include "../../dynamic.h"
6060
#include "../../frontend/frontend_driver.h"
@@ -91,7 +91,7 @@ typedef struct hlsl_renderchain
9191
struct shader_pass stock_shader;
9292
} hlsl_renderchain_t;
9393

94-
/*
94+
/*
9595
* DISPLAY DRIVER
9696
*/
9797

@@ -123,7 +123,7 @@ static void *gfx_display_d3d9_hlsl_get_default_mvp(void *data)
123123
{
124124
static float id[16] = { 1.0f, 0.0f, 0.0f, 0.0f,
125125
0.0f, 1.0f, 0.0f, 0.0f,
126-
0.0f, 0.0f, 1.0f, 0.0f,
126+
0.0f, 0.0f, 1.0f, 0.0f,
127127
0.0f, 0.0f, 0.0f, 1.0f
128128
};
129129
return &id;
@@ -387,7 +387,7 @@ gfx_display_ctx_driver_t gfx_display_ctx_d3d9_hlsl = {
387387
gfx_display_d3d9_hlsl_scissor_end
388388
};
389389

390-
/*
390+
/*
391391
* VIDEO DRIVER
392392
*/
393393

@@ -596,7 +596,7 @@ static bool hlsl_d3d9_renderchain_create_first_pass(
596596
int i;
597597
struct shader_pass pass = { 0 };
598598
unsigned fmt =
599-
(_fmt == RETRO_PIXEL_FORMAT_RGB565)
599+
(_fmt == RETRO_PIXEL_FORMAT_RGB565)
600600
? D3D9_RGB565_FORMAT
601601
: D3D9_XRGB8888_FORMAT;
602602

@@ -844,8 +844,8 @@ static void hlsl_d3d9_renderchain_render_pass(
844844
struct shader_pass *pass,
845845
unsigned pass_index)
846846
{
847-
/* Currently we override the passes shader program
848-
with the stock shader as at least the last pass
847+
/* Currently we override the passes shader program
848+
with the stock shader as at least the last pass
849849
is not setup correctly */
850850
#if 0
851851
d3d9_hlsl_bind_program(chain->chain.dev, pass);
@@ -856,8 +856,8 @@ static void hlsl_d3d9_renderchain_render_pass(
856856
IDirect3DDevice9_SetTexture(chain->chain.dev, 0,
857857
(IDirect3DBaseTexture9*)pass->tex);
858858

859-
/* D3D8 sets the sampler address modes -
860-
I've left them out for the time being
859+
/* D3D8 sets the sampler address modes -
860+
I've left them out for the time being
861861
but maybe this is a bug in d3d9 */
862862
#if 0
863863
IDirect3DDevice9_SetSamplerState(chain->chain.dev,
@@ -1019,7 +1019,7 @@ static void hlsl_d3d9_renderchain_render(
10191019
chain->chain.frame_count, 0);
10201020

10211021
hlsl_d3d9_renderchain_render_pass(chain,
1022-
from_pass,
1022+
from_pass,
10231023
i + 1);
10241024

10251025
current_width = out_width;
@@ -1186,7 +1186,7 @@ static bool d3d9_hlsl_init_chain(d3d9_video_t *d3d,
11861186
d3d, (hlsl_renderchain_t*)d3d->renderchain_data,
11871187
d3d->dev, &d3d->final_viewport, &link_info,
11881188
rgb32
1189-
? RETRO_PIXEL_FORMAT_XRGB8888
1189+
? RETRO_PIXEL_FORMAT_XRGB8888
11901190
: RETRO_PIXEL_FORMAT_RGB565
11911191
)
11921192
)
@@ -1234,8 +1234,8 @@ static bool d3d9_hlsl_init_chain(d3d9_video_t *d3d,
12341234
chain,
12351235
d3d->shader.lut[i].id,
12361236
d3d->shader.lut[i].path,
1237-
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC
1238-
? video_smooth
1237+
d3d->shader.lut[i].filter == RARCH_FILTER_UNSPEC
1238+
? video_smooth
12391239
: (d3d->shader.lut[i].filter == RARCH_FILTER_LINEAR)))
12401240
{
12411241
RARCH_ERR("[D3D9]: Failed to init LUTs.\n");
@@ -1452,10 +1452,10 @@ static bool d3d9_hlsl_init_internal(d3d9_video_t *d3d,
14521452
windowed_full = settings->bools.video_windowed_fullscreen;
14531453

14541454
full_x = (windowed_full || info->width == 0)
1455-
? (unsigned)(mon_rect.right - mon_rect.left)
1455+
? (unsigned)(mon_rect.right - mon_rect.left)
14561456
: info->width;
14571457
full_y = (windowed_full || info->height == 0)
1458-
? (unsigned)(mon_rect.bottom - mon_rect.top)
1458+
? (unsigned)(mon_rect.bottom - mon_rect.top)
14591459
: info->height;
14601460
#else
14611461
d3d9_get_video_size(d3d, &full_x, &full_y);
@@ -1488,7 +1488,7 @@ static bool d3d9_hlsl_init_internal(d3d9_video_t *d3d,
14881488
#ifndef _XBOX_
14891489
d3d9_hlsl_fake_context.get_metrics = win32_get_metrics;
14901490
#endif
1491-
video_context_driver_set(&d3d9_hlsl_fake_context);
1491+
video_context_driver_set(&d3d9_hlsl_fake_context);
14921492
{
14931493
const char *shader_preset = video_shader_get_current_shader_preset();
14941494
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
@@ -1673,12 +1673,12 @@ static bool d3d9_hlsl_frame(void *data, const void *frame,
16731673
hlsl_d3d9_renderchain_render(
16741674
d3d, frame, frame_width, frame_height,
16751675
pitch, d3d->dev_rotation);
1676-
1676+
16771677
if (black_frame_insertion && !d3d->menu->enabled)
16781678
{
16791679
unsigned n;
1680-
for (n = 0; n < video_info->black_frame_insertion; ++n)
1681-
{
1680+
for (n = 0; n < video_info->black_frame_insertion; ++n)
1681+
{
16821682
#ifdef _XBOX
16831683
bool ret = true;
16841684
IDirect3DDevice9_Present(d3d->dev, NULL, NULL, NULL, NULL);
@@ -1691,7 +1691,7 @@ static bool d3d9_hlsl_frame(void *data, const void *frame,
16911691
IDirect3DDevice9_Clear(d3d->dev, 0, 0, D3DCLEAR_TARGET,
16921692
0, 1, 0);
16931693
}
1694-
}
1694+
}
16951695

16961696
#ifdef HAVE_OVERLAY
16971697
if (d3d->overlays_enabled && overlay_behind_menu)

gfx/drivers/metal.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
#endif
4949

5050
#include "../font_driver.h"
51+
#include "../video_driver.h"
5152

5253
#include "../common/metal_common.h"
5354

@@ -60,8 +61,6 @@
6061
#endif
6162
#include "../../verbosity.h"
6263

63-
#include "../video_coord_array.h"
64-
6564
#include "../../ui/drivers/cocoa/apple_platform.h"
6665
#include "../../ui/drivers/cocoa/cocoa_common.h"
6766

0 commit comments

Comments
 (0)