RetroArch
d3d8_common.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2011-2017 - Daniel De Matteis
3  *
4  * RetroArch is free software: you can redistribute it and/or modify it under the terms
5  * of the GNU General Public License as published by the Free Software Found-
6  * ation, either version 3 of the License, or (at your option) any later version.
7  *
8  * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
9  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10  * PURPOSE. See the GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License along with RetroArch.
13  * If not, see <http://www.gnu.org/licenses/>.
14  */
15 
16 #ifndef _D3D8_COMMON_H
17 #define _D3D8_COMMON_H
18 
19 #include <boolean.h>
20 #include <retro_common_api.h>
21 #include <retro_inline.h>
22 
23 #include <d3d8.h>
24 
25 #include "../video_driver.h"
26 #include "../../verbosity.h"
27 
29 
30 typedef struct d3d8_video
31 {
34  bool quitting;
37  /* TODO - refactor this away properly. */
39 
40  unsigned cur_mon_id;
41  unsigned dev_rotation;
42 
45 
49 
53 #ifdef HAVE_WINDOW
54  WNDCLASSEX windowClass;
55 #endif
58 
59  char *shader_path;
60 
61  struct
62  {
63  int size;
64  int offset;
65  void *buffer;
66  void *decl;
67  }menu_display;
68 
69  size_t overlays_size;
71 } d3d8_video_t;
72 
73 static INLINE bool d3d8_swap(void *data, LPDIRECT3DDEVICE8 dev)
74 {
77  return false;
78  return true;
79 }
80 
83  unsigned length, unsigned usage,
84  unsigned fvf, D3DPOOL pool, void *handle)
85 {
86  void *buf = NULL;
88  dev, length, usage, fvf,
89  pool,
90  (struct IDirect3DVertexBuffer8**)&buf)))
91  return NULL;
92  return buf;
93 }
94 
95 static INLINE void *
97 {
98  void *buf = NULL;
99 
100  if (!vertbuf)
101  return NULL;
102 
103  IDirect3DVertexBuffer8_Lock(vertbuf, 0, 0, (BYTE**)&buf, 0);
104 
105  if (!buf)
106  return NULL;
107 
108  return buf;
109 }
110 
112  LPDIRECT3DVERTEXBUFFER8 vertbuf)
113 {
114  if (vertbuf)
116 }
117 
120  void *vertex_declaration)
121 {
122  if (buf)
123  {
125  buf = NULL;
126  }
127 }
128 
130  LPDIRECT3DTEXTURE8 tex,
131  unsigned idx, void *_ppsurface_level)
132 {
133  if (SUCCEEDED(IDirect3DTexture8_GetLevelDesc(
134  tex, idx, (D3DSURFACE_DESC*)_ppsurface_level)))
135  return true;
136  return false;
137 }
138 
140  LPDIRECT3DTEXTURE8 tex,
141  unsigned idx, void **_ppsurface_level)
142 {
143  if (tex &&
144  SUCCEEDED(
146  tex, idx, (IDirect3DSurface8**)_ppsurface_level)))
147  return true;
148  return false;
149 }
150 
152  const char *path, unsigned width, unsigned height,
153  unsigned miplevels, unsigned usage, INT32 format,
154  INT32 pool, unsigned filter, unsigned mipfilter,
155  INT32 color_key, void *src_info_data,
156  PALETTEENTRY *palette, bool want_mipmap);
157 
159  unsigned stream_no,
160  LPDIRECT3DVERTEXBUFFER8 stream_vertbuf,
161  unsigned offset_bytes,
162  unsigned stride)
163 {
164  if (stream_vertbuf)
166  stream_no, stream_vertbuf, stride);
167 }
168 
170 {
171  if (tex)
173 }
174 
177 {
179 }
180 
182  unsigned sampler, D3DTEXTURESTAGESTATETYPE type, unsigned value)
183 {
186  RARCH_ERR("SetTextureStageState call failed, sampler: %d, value: %d, type: %d\n", sampler, value, type);
187 }
188 
190  unsigned sampler, unsigned value)
191 {
193 }
194 
196  unsigned sampler, unsigned value)
197 {
199 }
200 
201 static INLINE void d3d8_set_sampler_minfilter(void *_dev,
202  unsigned sampler, unsigned value)
203 {
205 }
206 
207 static INLINE void d3d8_set_sampler_magfilter(void *_dev,
208  unsigned sampler, unsigned value)
209 {
211 }
212 
213 void d3d8_set_sampler_mipfilter(void *dev,
214  unsigned sampler, unsigned value);
215 
217 {
218  if (!dev)
219  return false;
220 #ifdef _XBOX
222 #else
223  if (FAILED(IDirect3DDevice8_BeginScene(dev)))
224  return false;
225 #endif
226 
227  return true;
228 }
229 
231 {
232  if (dev)
234 }
235 
237  D3DPRIMITIVETYPE type, unsigned start, unsigned count)
238 {
239  if (!d3d8_begin_scene(dev))
240  return;
241 
243  d3d8_end_scene(dev);
244 }
245 
247  unsigned count, const void *rects, unsigned flags,
248  INT32 color, float z, unsigned stencil)
249 {
250  if (dev)
251  IDirect3DDevice8_Clear(dev, count, (const D3DRECT*)rects, flags,
252  color, z, stencil);
253 }
254 
256  LPDIRECT3DTEXTURE8 tex,
257  unsigned level, D3DLOCKED_RECT *lr, RECT *rect,
258  unsigned rectangle_height, unsigned flags)
259 {
260  if (tex &&
262  level, lr, rect, flags) == D3D_OK)
263  return true;
264  return false;
265 }
266 
268 {
269  if (tex)
271 }
272 
274  void *tex,
275  unsigned level, D3DLOCKED_RECT *lr, RECT *rect,
276  unsigned rectangle_height, unsigned flags)
277 {
278 #if defined(_XBOX)
279  level = 0;
280 #endif
281  memset(lr->pBits, level, rectangle_height * lr->Pitch);
283 }
284 
286  LPDIRECT3DDEVICE8 dev, unsigned sampler,
287  LPDIRECT3DTEXTURE8 tex)
288 {
289  if (dev && tex)
291  (IDirect3DBaseTexture8*)tex);
292 }
293 
295  LPDIRECT3DDEVICE8 dev,
296  unsigned index,
297  void *data)
298 {
300  return false;
301  return true;
302 }
303 
305  unsigned pixel_size,
306  void *tex,
307  D3DLOCKED_RECT *lr,
308  const void *frame,
309  unsigned width, unsigned height, unsigned pitch)
310 {
311  unsigned y;
312 
313  for (y = 0; y < height; y++)
314  {
315  const uint8_t *in = (const uint8_t*)frame + y * pitch;
316  uint8_t *out = (uint8_t*)lr->pBits + y * lr->Pitch;
317  memcpy(out, in, width * pixel_size);
318  }
319 }
320 
322  LPDIRECT3DDEVICE8 dev,
323  void *vp)
324 {
325  if (dev)
327 }
328 
330  LPDIRECT3DDEVICE8 dev,
332  DWORD value)
333 {
334  if (dev)
336 }
337 
339 {
340  if (!data)
341  return;
342 
346 }
347 
349 {
351 }
352 
354 {
355  /* Also blend the texture with the set alpha value. */
359 }
360 
361 void d3d8_frame_postprocess(void *data);
362 
364 {
365  if (surf)
367 }
368 
370  LPDIRECT3DDEVICE8 dev,
371  unsigned idx, void **data)
372 {
373  if (dev &&
374  SUCCEEDED(IDirect3DDevice8_GetRenderTarget(dev,
376  return true;
377  return false;
378 }
379 
381  LPDIRECT3DDEVICE8 dev, unsigned idx,
382  LPDIRECT3DSURFACE8 surf)
383 {
384  if (dev)
386 }
387 
390 {
391  if (dev &&
393  return true;
394  return false;
395 }
396 
398  LPDIRECT3DSURFACE8 surf, void *data2)
399 {
400  if (surf &&
401  SUCCEEDED(
403  surf, (D3DLOCKED_RECT*)data2,
405  return true;
406  return false;
407 }
408 
410 {
411  if (surf)
413 }
414 
416  LPDIRECT3D8 d3d,
417  unsigned idx,
418  void *display_mode)
419 {
420  if (d3d &&
422  d3d, idx, (D3DDISPLAYMODE*)display_mode)))
423  return true;
424  return false;
425 }
426 
427 bool d3d8_create_device(void *dev,
428  void *d3dpp,
429  LPDIRECT3D8 d3d,
430  HWND focus_window,
431  unsigned cur_mon_id);
432 
433 bool d3d8_reset(void *dev, void *d3dpp);
434 
436  LPDIRECT3DDEVICE8 dev,
437  unsigned idx, unsigned swapchain_idx,
438  unsigned backbuffer_type, void **data)
439 {
440  if (dev &&
441  SUCCEEDED(IDirect3DDevice8_GetBackBuffer(dev, idx,
442  (D3DBACKBUFFER_TYPE)backbuffer_type,
444  return true;
445  return false;
446 }
447 
449  LPDIRECT3DDEVICE8 dev, LPDIRECT3D8 pd3d)
450 {
451  if (dev)
453  if (pd3d)
454  IDirect3D8_Release(pd3d);
455 }
456 
457 void *d3d8_create(void);
458 
460 
461 void d3d8_deinitialize_symbols(void);
462 
464  LPDIRECT3D8 d3d,
465  unsigned idx,
466  INT32 disp_format,
467  INT32 backbuffer_format,
468  bool windowed_mode)
469 {
470  if (d3d &&
471  SUCCEEDED(IDirect3D8_CheckDeviceType(d3d,
472  0,
474  disp_format,
475  backbuffer_format,
476  windowed_mode)))
477  return true;
478  return false;
479 }
480 
482  void *desc, void **font_data);
483 
484 void d3d8x_font_draw_text(void *data, void *sprite_data, void *string_data,
485  unsigned count, void *rect_data, unsigned format, unsigned color);
486 
487 void d3d8x_font_get_text_metrics(void *data, void *metrics);
488 
489 void d3d8x_font_release(void *data);
490 
492 {
493 #ifdef _XBOX
494  return D3DFMT_LIN_R5G6B5;
495 #else
496  return D3DFMT_R5G6B5;
497 #endif
498 }
499 
501 {
502 #ifdef _XBOX
503  return D3DFMT_LIN_A8R8G8B8;
504 #else
505  return D3DFMT_A8R8G8B8;
506 #endif
507 }
508 
510 {
511 #ifdef _XBOX
512  return D3DFMT_LIN_X8R8G8B8;
513 #else
514  return D3DFMT_X8R8G8B8;
515 #endif
516 }
517 
519 
520 #endif
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:6559
#define IDirect3DTexture8_GetLevelDesc(p, a, b)
Definition: d3d8.h:710
Definition: d3d8types.h:1189
Definition: d3d_common.h:64
GLuint shader
Definition: glext.h:6670
enum _D3DPOOL D3DPOOL
static INLINE void d3d8_clear(LPDIRECT3DDEVICE8 dev, unsigned count, const void *rects, unsigned flags, INT32 color, float z, unsigned stencil)
Definition: d3d8_common.h:246
bool needs_restore
Definition: d3d8_common.h:35
enum _D3DPRIMITIVETYPE D3DPRIMITIVETYPE
struct IDirect3DDevice8 * LPDIRECT3DDEVICE8
Definition: d3d8.h:326
struct video_viewport vp
Definition: d3d8_common.h:50
Definition: d3d8types.h:92
Definition: matrix_4x4.h:40
static INLINE void d3d8_unlock_rectangle(LPDIRECT3DTEXTURE8 tex)
Definition: d3d8_common.h:267
math_matrix_4x4 mvp_rotate
Definition: d3d8_common.h:47
video_info_t video_info
Definition: d3d8_common.h:52
enum _D3DTEXTURESTAGESTATETYPE D3DTEXTURESTAGESTATETYPE
struct IDirect3DSurface8 * LPDIRECT3DSURFACE8
Definition: d3d8.h:1020
void d3d8x_font_draw_text(void *data, void *sprite_data, void *string_data, unsigned count, void *rect_data, unsigned format, unsigned color)
Definition: d3d8_common.c:336
Definition: d3d8types.h:77
Definition: d3d8_common.h:30
#define INLINE
Definition: retro_inline.h:35
#define IDirect3DDevice8_SetViewport(p, a)
Definition: d3d8.h:369
#define IDirect3DDevice8_GetBackBuffer(p, a, b, c)
Definition: d3d8.h:345
overlay_t * menu
Definition: d3d8_common.h:43
static INLINE void d3d8_draw_primitive(LPDIRECT3DDEVICE8 dev, D3DPRIMITIVETYPE type, unsigned start, unsigned count)
Definition: d3d8_common.h:236
Definition: d3d8types.h:333
#define IDirect3DVertexBuffer8_Unlock(p)
Definition: d3d8.h:922
static INLINE void d3d8_set_sampler_minfilter(void *_dev, unsigned sampler, unsigned value)
Definition: d3d8_common.h:201
static INLINE INT32 d3d8_get_argb8888_format(void)
Definition: d3d8_common.h:500
unsigned cur_mon_id
Definition: d3d8_common.h:40
static INLINE void d3d8_vertex_buffer_free(LPDIRECT3DVERTEXBUFFER8 buf, void *vertex_declaration)
Definition: d3d8_common.h:118
static INLINE void d3d8_set_transform(LPDIRECT3DDEVICE8 dev, D3DTRANSFORMSTATETYPE state, const D3DMATRIX *matrix)
Definition: d3d8_common.h:175
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
#define IDirect3DSurface8_UnlockRect(p)
Definition: d3d8.h:1033
interface IDirect3DBaseTexture8 IDirect3DBaseTexture8
Definition: d3d8.h:123
static INLINE INT32 d3d8_get_rgb565_format(void)
Definition: d3d8_common.h:491
#define IDirect3DDevice8_SetRenderState(p, a, b)
Definition: d3d8.h:379
#define IDirect3DTexture8_GetSurfaceLevel(p, a, b)
Definition: d3d8.h:711
static INLINE void d3d8_device_free(LPDIRECT3DDEVICE8 dev, LPDIRECT3D8 pd3d)
Definition: d3d8_common.h:448
Definition: d3d8types.h:451
GLuint start
Definition: glext.h:6292
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:8418
Definition: ffmpeg_core.c:151
struct IDirect3DVertexBuffer8 * LPDIRECT3DVERTEXBUFFER8
Definition: d3d8.h:907
struct IDirect3D8 * LPDIRECT3D8
Definition: d3d8.h:181
#define IDirect3DDevice8_DrawPrimitive(p, a, b, c)
Definition: d3d8.h:399
static INLINE void d3d8_set_sampler_address_v(LPDIRECT3DDEVICE8 dev, unsigned sampler, unsigned value)
Definition: d3d8_common.h:195
#define IDirect3D8_Release(p)
Definition: d3d8.h:186
static INLINE void d3d8_texture_free(LPDIRECT3DTEXTURE8 tex)
Definition: d3d8_common.h:169
void * decl
Definition: d3d8_common.h:66
GLsizei const GLchar ** path
Definition: glext.h:7901
#define IDirect3DVertexBuffer8_Lock(p, a, b, c, d)
Definition: d3d8.h:921
void * pBits
Definition: d3d8types.h:1509
bool quitting
Definition: d3d8_common.h:34
struct IDirect3DTexture8 * LPDIRECT3DTEXTURE8
Definition: d3d8.h:693
static INLINE bool d3d8_device_get_backbuffer(LPDIRECT3DDEVICE8 dev, unsigned idx, unsigned swapchain_idx, unsigned backbuffer_type, void **data)
Definition: d3d8_common.h:435
static INLINE void d3d8_enable_blend_func(void *data)
Definition: d3d8_common.h:338
static tesseract::TessBaseAPI * api
Definition: tess_get_text.cpp:7
#define IDirect3DSurface8_Release(p)
Definition: d3d8.h:1025
bool keep_aspect
Definition: d3d8_common.h:32
GLuint GLenum matrix
Definition: glext.h:10314
struct passwd out
Definition: missing_libc_functions.c:51
GLdouble GLdouble z
Definition: glext.h:6514
Definition: d3d8types.h:442
#define IDirect3DDevice8_CreateVertexBuffer(p, a, b, c, d, e)
Definition: d3d8.h:352
#define IDirect3DTexture8_UnlockRect(p, a)
Definition: d3d8.h:713
#define IDirect3DDevice8_GetRenderState(p, a, b)
Definition: d3d8.h:380
Definition: d3d8types.h:218
Definition: ibxm.h:9
GLuint GLuint GLsizei count
Definition: glext.h:6292
bool resolution_hd_enable
Definition: d3d8_common.h:38
static INLINE INT32 d3d8_get_xrgb8888_format(void)
Definition: d3d8_common.h:509
Definition: video_shader_parse.h:143
void * renderchain_data
Definition: d3d8_common.h:44
void d3d8x_font_release(void *data)
Definition: d3d8_common.c:350
math_matrix_4x4 mvp
Definition: d3d8_common.h:46
#define IDirect3DDevice8_BeginScene(p)
Definition: d3d8.h:363
Definition: d3d8types.h:217
#define D3DERR_DEVICELOST
Definition: d3d8.h:1208
static INLINE void d3d8_vertex_buffer_unlock(LPDIRECT3DVERTEXBUFFER8 vertbuf)
Definition: d3d8_common.h:111
static INLINE void d3d8_device_set_render_target(LPDIRECT3DDEVICE8 dev, unsigned idx, LPDIRECT3DSURFACE8 surf)
Definition: d3d8_common.h:380
void d3d8_frame_postprocess(void *data)
Definition: d3d8_common.c:220
bool should_resize
Definition: d3d8_common.h:33
static INLINE bool d3d8_begin_scene(LPDIRECT3DDEVICE8 dev)
Definition: d3d8_common.h:216
static INLINE void d3d8_lock_rectangle_clear(void *tex, unsigned level, D3DLOCKED_RECT *lr, RECT *rect, unsigned rectangle_height, unsigned flags)
Definition: d3d8_common.h:273
bool d3d8_create_device(void *dev, void *d3dpp, LPDIRECT3D8 d3d, HWND focus_window, unsigned cur_mon_id)
Definition: d3d8_common.c:269
#define NULL
Pointer to 0.
Definition: gctypes.h:65
#define IDirect3DDevice8_Release(p)
Definition: d3d8.h:331
void * buffer
Definition: d3d8_common.h:65
GLenum type
Definition: glext.h:6233
#define IDirect3DDevice8_SetTransform(p, a, b)
Definition: d3d8.h:366
Definition: d3d8types.h:453
int32_t INT32
Definition: coretypes.h:17
static INLINE void * d3d8_vertex_buffer_new(LPDIRECT3DDEVICE8 dev, unsigned length, unsigned usage, unsigned fvf, D3DPOOL pool, void *handle)
Definition: d3d8_common.h:81
#define IDirect3DDevice8_SetVertexShader(p, a)
Definition: d3d8.h:405
#define IDirect3DDevice8_SetRenderTarget(p, a, b)
Definition: d3d8.h:360
overlay_t * overlays
Definition: d3d8_common.h:70
static INLINE void d3d8_set_stream_source(LPDIRECT3DDEVICE8 dev, unsigned stream_no, LPDIRECT3DVERTEXBUFFER8 stream_vertbuf, unsigned offset_bytes, unsigned stride)
Definition: d3d8_common.h:158
Definition: d3d8types.h:1259
#define IDirect3DTexture8_LockRect(p, a, b, c, d)
Definition: d3d8.h:712
bool d3d8x_create_font_indirect(LPDIRECT3DDEVICE8 dev, void *desc, void **font_data)
Definition: d3d8_common.c:324
Definition: d3d8types.h:1479
GLint level
Definition: glext.h:6293
void * d3d8_create(void)
Definition: d3d8_common.c:85
static INLINE void d3d8_surface_free(LPDIRECT3DSURFACE8 surf)
Definition: d3d8_common.h:363
bool overlays_enabled
Definition: d3d8_common.h:36
static INLINE bool d3d8_lock_rectangle(LPDIRECT3DTEXTURE8 tex, unsigned level, D3DLOCKED_RECT *lr, RECT *rect, unsigned rectangle_height, unsigned flags)
Definition: d3d8_common.h:255
static INLINE bool d3d8_swap(void *data, LPDIRECT3DDEVICE8 dev)
Definition: d3d8_common.h:73
static INLINE bool d3d8_check_device_type(LPDIRECT3D8 d3d, unsigned idx, INT32 disp_format, INT32 backbuffer_format, bool windowed_mode)
Definition: d3d8_common.h:463
static uint64_t state[MAX_PADS]
Definition: xenon360_input.c:33
GLint GLfloat GLint stencil
Definition: glext.h:6900
static INLINE bool d3d8_texture_get_level_desc(LPDIRECT3DTEXTURE8 tex, unsigned idx, void *_ppsurface_level)
Definition: d3d8_common.h:129
GLint GLint GLint GLint GLint GLint y
Definition: glext.h:6295
Definition: video_driver.h:332
bool d3d8_initialize_symbols(enum gfx_ctx_api api)
Definition: d3d8_common.c:102
GLuint in
Definition: glext.h:10523
#define IDirect3DDevice8_Clear(p, a, b, c, d, e, f)
Definition: d3d8.h:365
#define IDirect3DDevice8_SetStreamSource(p, a, b, c)
Definition: d3d8.h:412
char * shader_path
Definition: d3d8_common.h:59
#define D3DLOCK_READONLY
Definition: d3d8types.h:1447
static INLINE void d3d8_enable_alpha_blend_texture_func(void *data)
Definition: d3d8_common.h:353
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 idx
Definition: pixman-arm-neon-asm.h:96
Definition: d3d8types.h:490
INT Pitch
Definition: d3d8types.h:1508
Definition: d3d8types.h:450
Definition: d3d8types.h:1261
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
gfx_ctx_api
Definition: video_driver.h:86
GLuint index
Definition: glext.h:6671
static INLINE bool d3d8_device_get_render_target(LPDIRECT3DDEVICE8 dev, unsigned idx, void **data)
Definition: d3d8_common.h:369
Definition: d3d8types.h:67
static INLINE void d3d8_set_viewports(LPDIRECT3DDEVICE8 dev, void *vp)
Definition: d3d8_common.h:321
unsigned dev_rotation
Definition: d3d8_common.h:41
Definition: d3d8types.h:1312
#define IDirect3DVertexBuffer8_Release(p)
Definition: d3d8.h:912
static INLINE void d3d8_set_sampler_magfilter(void *_dev, unsigned sampler, unsigned value)
Definition: d3d8_common.h:207
D3DVIEWPORT8 final_viewport
Definition: d3d8_common.h:57
int offset
Definition: d3d8_common.h:64
struct d3d8_video::@199 menu_display
void d3d8x_font_get_text_metrics(void *data, void *metrics)
Definition: d3d8_common.c:359
static INLINE void d3d8_set_texture(LPDIRECT3DDEVICE8 dev, unsigned sampler, LPDIRECT3DTEXTURE8 tex)
Definition: d3d8_common.h:285
#define IDirect3DDevice8_Present(p, a, b, c, d)
Definition: d3d8.h:344
Definition: video_driver.h:686
void * d3d8_texture_new(LPDIRECT3DDEVICE8 dev, const char *path, unsigned width, unsigned height, unsigned miplevels, unsigned usage, INT32 format, INT32 pool, unsigned filter, unsigned mipfilter, INT32 color_key, void *src_info_data, PALETTEENTRY *palette, bool want_mipmap)
Definition: d3d8_common.c:189
static INLINE void d3d8_set_sampler_address_u(LPDIRECT3DDEVICE8 dev, unsigned sampler, unsigned value)
Definition: d3d8_common.h:189
#define IDirect3DDevice8_EndScene(p)
Definition: d3d8.h:364
GLuint color
Definition: glext.h:6883
#define D3DTA_TEXTURE
Definition: d3d8types.h:549
void d3d8_set_sampler_mipfilter(void *dev, unsigned sampler, unsigned value)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: glext.h:6293
Definition: d3d8types.h:1506
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glext.h:7672
Definition: d3d8types.h:444
GLint GLint GLsizei width
Definition: glext.h:6293
static INLINE void d3d8_texture_blit(unsigned pixel_size, void *tex, D3DLOCKED_RECT *lr, const void *frame, unsigned width, unsigned height, unsigned pitch)
Definition: d3d8_common.h:304
Definition: d3d8types.h:332
#define IDirect3DDevice8_SetTextureStageState(p, a, b, c)
Definition: d3d8.h:392
#define IDirect3DDevice8_SetTexture(p, a, b)
Definition: d3d8.h:390
static INLINE void d3d8_end_scene(LPDIRECT3DDEVICE8 dev)
Definition: d3d8_common.h:230
static INLINE void d3d8_set_texture_stage_state(LPDIRECT3DDEVICE8 dev, unsigned sampler, D3DTEXTURESTAGESTATETYPE type, unsigned value)
Definition: d3d8_common.h:181
bool d3d8_reset(void *dev, void *d3dpp)
Definition: d3d8_common.c:290
#define D3D_OK
Definition: d3d8.h:1191
int size
Definition: d3d8_common.h:63
Definition: d3d8types.h:443
GLsizei const GLfloat * value
Definition: glext.h:6709
static INLINE bool d3d8_set_vertex_shader(LPDIRECT3DDEVICE8 dev, unsigned index, void *data)
Definition: d3d8_common.h:294
enum _D3DRENDERSTATETYPE D3DRENDERSTATETYPE
size_t overlays_size
Definition: d3d8_common.h:69
interface IDirect3DSurface8 IDirect3DSurface8
Definition: d3d8.h:129
#define IDirect3D8_CheckDeviceType(p, a, b, c, d, e)
Definition: d3d8.h:193
GLsizei stride
Definition: glext.h:6488
void d3d8_deinitialize_symbols(void)
Definition: d3d8_common.c:154
LPDIRECT3DDEVICE8 dev
Definition: d3d8_common.h:56
static INLINE void * d3d8_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER8 vertbuf)
Definition: d3d8_common.h:96
#define IDirect3D8_GetAdapterDisplayMode(p, a, b)
Definition: d3d8.h:192
#define IDirect3DSurface8_LockRect(p, a, b, c)
Definition: d3d8.h:1032
static INLINE bool d3d8_get_render_state(LPDIRECT3DDEVICE8 dev, D3DRENDERSTATETYPE state, DWORD *value)
Definition: d3d8_common.h:388
static INLINE bool d3d8_get_adapter_display_mode(LPDIRECT3D8 d3d, unsigned idx, void *display_mode)
Definition: d3d8_common.h:415
GLuint sampler
Definition: glext.h:7950
static INLINE void d3d8_surface_unlock_rect(LPDIRECT3DSURFACE8 surf)
Definition: d3d8_common.h:409
GLbitfield flags
Definition: glext.h:7828
Definition: d3d8types.h:454
#define D3DTA_DIFFUSE
Definition: d3d8types.h:547
Definition: d3d8types.h:1260
static INLINE bool d3d8_texture_get_surface_level(LPDIRECT3DTEXTURE8 tex, unsigned idx, void **_ppsurface_level)
Definition: d3d8_common.h:139
enum _D3DTRANSFORMSTATETYPE D3DTRANSFORMSTATETYPE
interface IDirect3DVertexBuffer8 IDirect3DVertexBuffer8
Definition: d3d8.h:127
void * memset(void *b, int c, size_t len)
Definition: string.c:7
GLenum GLuint GLenum GLsizei length
Definition: glext.h:6233
enum _D3DBACKBUFFER_TYPE D3DBACKBUFFER_TYPE
unsigned char uint8_t
Definition: stdint.h:124
Definition: d3d8types.h:339
static INLINE void d3d8_disable_blend_func(void *data)
Definition: d3d8_common.h:348
static INLINE bool d3d8_surface_lock_rect(LPDIRECT3DSURFACE8 surf, void *data2)
Definition: d3d8_common.h:397
math_matrix_4x4 mvp_transposed
Definition: d3d8_common.h:48
#define IDirect3DDevice8_GetRenderTarget(p, a)
Definition: d3d8.h:361
#define IDirect3DTexture8_Release(p)
Definition: d3d8.h:698
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
RETRO_BEGIN_DECLS struct d3d8_video d3d8_video_t
void RARCH_ERR(const char *fmt,...)
Definition: verbosity.c:313
static INLINE void d3d8_set_render_state(LPDIRECT3DDEVICE8 dev, D3DRENDERSTATETYPE state, DWORD value)
Definition: d3d8_common.h:329
void * memcpy(void *dst, const void *src, size_t len)
Definition: string.c:26
GLsizei GLenum const GLvoid GLuint GLsizei GLfloat * metrics
Definition: glext.h:12652