RetroArch
d3d9_renderchain.h
Go to the documentation of this file.
1 /* RetroArch - A frontend for libretro.
2  * Copyright (C) 2011-2018 - 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 __D3D9_RENDERCHAIN_H__
17 #define __D3D9_RENDERCHAIN_H__
18 
19 #include <stdint.h>
20 
21 #include <retro_common_api.h>
22 #include <retro_inline.h>
23 #include <boolean.h>
24 
25 #include <d3d9.h>
26 #include "../common/d3d9_common.h"
27 #include "../../verbosity.h"
28 
30 
31 #define D3D_DEFAULT_NONPOW2 ((UINT)-2)
32 #define D3D_FILTER_LINEAR (3 << 0)
33 #define D3D_FILTER_POINT (2 << 0)
34 
35 struct lut_info
36 {
38  char id[64];
39  bool smooth;
40 };
41 
43 {
45  struct LinkInfo info;
50  void *attrib_map;
51  void *vprg;
52  void *fprg;
53  void *vtable;
54  void *ftable;
55 };
56 
57 #define D3D_PI 3.14159265358979323846264338327
58 
59 #define VECTOR_LIST_TYPE unsigned
60 #define VECTOR_LIST_NAME unsigned
61 #include "../../libretro-common/lists/vector_list.c"
62 #undef VECTOR_LIST_TYPE
63 #undef VECTOR_LIST_NAME
64 
65 #define VECTOR_LIST_TYPE struct lut_info
66 #define VECTOR_LIST_NAME lut_info
67 #include "../../libretro-common/lists/vector_list.c"
68 #undef VECTOR_LIST_TYPE
69 #undef VECTOR_LIST_NAME
70 
71 #define VECTOR_LIST_TYPE struct shader_pass
72 #define VECTOR_LIST_NAME shader_pass
73 #include "../../libretro-common/lists/vector_list.c"
74 #undef VECTOR_LIST_TYPE
75 #undef VECTOR_LIST_NAME
76 
77 struct D3D9Vertex
78 {
79  float x, y, z;
80  float u, v;
81  float lut_u, lut_v;
82  float r, g, b, a;
83 };
84 
85 typedef struct d3d9_renderchain
86 {
87  unsigned pixel_size;
89  struct
90  {
93  unsigned ptr;
94  unsigned last_width[TEXTURES];
95  unsigned last_height[TEXTURES];
96  } prev;
99  struct shader_pass_vector_list *passes;
100  struct unsigned_vector_list *bound_tex;
101  struct unsigned_vector_list *bound_vert;
102  struct lut_info_vector_list *luts;
104 
106  d3d9_renderchain_t *chain,
107  struct shader_pass *pass,
108  unsigned width, unsigned height,
109  unsigned out_width, unsigned out_height,
110  unsigned vp_width, unsigned vp_height,
111  unsigned rotation
112  )
113 {
114  struct D3D9Vertex vert[4];
115  unsigned i;
116  void *verts = NULL;
117  const struct
118  LinkInfo *info = (const struct LinkInfo*)&pass->info;
119  float _u = (float)(width) / info->tex_w;
120  float _v = (float)(height) / info->tex_h;
121 
122  pass->last_width = width;
123  pass->last_height = height;
124 
125  vert[0].x = 0.0f;
126  vert[0].y = out_height;
127  vert[0].z = 0.5f;
128  vert[0].u = 0.0f;
129  vert[0].v = 0.0f;
130  vert[0].lut_u = 0.0f;
131  vert[0].lut_v = 0.0f;
132  vert[0].r = 1.0f;
133  vert[0].g = 1.0f;
134  vert[0].b = 1.0f;
135  vert[0].a = 1.0f;
136 
137  vert[1].x = out_width;
138  vert[1].y = out_height;
139  vert[1].z = 0.5f;
140  vert[1].u = _u;
141  vert[1].v = 0.0f;
142  vert[1].lut_u = 1.0f;
143  vert[1].lut_v = 0.0f;
144  vert[1].r = 1.0f;
145  vert[1].g = 1.0f;
146  vert[1].b = 1.0f;
147  vert[1].a = 1.0f;
148 
149  vert[2].x = 0.0f;
150  vert[2].y = 0.0f;
151  vert[2].z = 0.5f;
152  vert[2].u = 0.0f;
153  vert[2].v = _v;
154  vert[2].lut_u = 0.0f;
155  vert[2].lut_v = 1.0f;
156  vert[2].r = 1.0f;
157  vert[2].g = 1.0f;
158  vert[2].b = 1.0f;
159  vert[2].a = 1.0f;
160 
161  vert[3].x = out_width;
162  vert[3].y = 0.0f;
163  vert[3].z = 0.5f;
164  vert[3].u = _u;
165  vert[3].v = _v;
166  vert[3].lut_u = 1.0f;
167  vert[3].lut_v = 1.0f;
168  vert[3].r = 1.0f;
169  vert[3].g = 1.0f;
170  vert[3].b = 1.0f;
171  vert[3].a = 1.0f;
172 
173  /* Align texels and vertices.
174  *
175  * Fixes infamous 'half-texel offset' issue of D3D9
176  * http://msdn.microsoft.com/en-us/library/bb219690%28VS.85%29.aspx.
177  */
178  for (i = 0; i < 4; i++)
179  {
180  vert[i].x -= 0.5f;
181  vert[i].y += 0.5f;
182  }
183 
184  verts = d3d9_vertex_buffer_lock(pass->vertex_buf);
185  memcpy(verts, vert, sizeof(vert));
186  d3d9_vertex_buffer_unlock(pass->vertex_buf);
187 }
188 
190  struct shader_pass *pass,
191  const struct LinkInfo *info)
192 {
193  LPDIRECT3DTEXTURE9 tex;
196  4 * sizeof(struct D3D9Vertex),
198 
199  if (!vertbuf)
200  return false;
201 
202  pass->vertex_buf = vertbuf;
203 
205  chain->dev,
206  NULL,
207  info->tex_w,
208  info->tex_h,
209  1,
211  chain->passes->data[
212  chain->passes->count - 1].info.pass->fbo.fp_fbo
214  D3DPOOL_DEFAULT, 0, 0, 0, NULL, NULL, false);
215 
216  if (!tex)
217  return false;
218 
219  pass->tex = tex;
220 
221  d3d9_set_texture(chain->dev, 0, pass->tex);
224  d3d9_set_texture(chain->dev, 0, NULL);
225 
226  shader_pass_vector_list_append(chain->passes, *pass);
227 
228  return true;
229 }
230 
232  const char *id, const char *path, bool smooth)
233 {
234  struct lut_info info;
237  chain->dev,
238  path,
241  0,
242  0,
243  ((D3DFORMAT)-3), /* D3DFMT_FROM_FILE */
246  0,
247  0,
248  NULL,
249  NULL,
250  false
251  );
252 
253  RARCH_LOG("[D3D9]: LUT texture loaded: %s.\n", path);
254 
255  info.tex = lut;
256  info.smooth = smooth;
257  strlcpy(info.id, id, sizeof(info.id));
258  if (!lut)
259  return false;
260 
261  d3d9_set_texture(chain->dev, 0, lut);
264  d3d9_set_texture(chain->dev, 0, NULL);
265 
266  lut_info_vector_list_append(chain->luts, info);
267 
268  return true;
269 }
270 
272  d3d9_renderchain_t *chain)
273 {
274  if (chain->passes)
275  {
276  unsigned i;
277 
278  for (i = 0; i < chain->passes->count; i++)
279  {
280  if (chain->passes->data[i].attrib_map)
281  free(chain->passes->data[i].attrib_map);
282  }
283 
284  shader_pass_vector_list_free(chain->passes);
285 
286  chain->passes = NULL;
287  }
288 
289  lut_info_vector_list_free(chain->luts);
290  unsigned_vector_list_free(chain->bound_tex);
291  unsigned_vector_list_free(chain->bound_vert);
292 
293  chain->luts = NULL;
294  chain->bound_tex = NULL;
295  chain->bound_vert = NULL;
296 }
297 
299  d3d9_renderchain_t *chain,
300  unsigned index, unsigned i)
301 {
302  d3d9_set_texture(chain->dev, index, chain->luts->data[i].tex);
309  unsigned_vector_list_append(chain->bound_tex, index);
310 }
311 
313 {
314  chain->passes->data[0].tex = chain->prev.tex[
315  chain->prev.ptr];
316  chain->passes->data[0].vertex_buf = chain->prev.vertex_buf[
317  chain->prev.ptr];
318  chain->passes->data[0].last_width = chain->prev.last_width[
319  chain->prev.ptr];
320  chain->passes->data[0].last_height = chain->prev.last_height[
321  chain->prev.ptr];
322 }
323 
325 {
326  chain->prev.last_width[chain->prev.ptr] = chain->passes->data[0].last_width;
327  chain->prev.last_height[chain->prev.ptr] = chain->passes->data[0].last_height;
328  chain->prev.ptr = (chain->prev.ptr + 1) & TEXTURESMASK;
329 }
330 
332 {
333  unsigned i;
334 
335  /* Have to be a bit anal about it.
336  * Render targets hate it when they have filters apparently.
337  */
338  for (i = 0; i < chain->bound_tex->count; i++)
339  {
341  chain->bound_tex->data[i], D3DTEXF_POINT);
343  chain->bound_tex->data[i], D3DTEXF_POINT);
344  d3d9_set_texture(chain->dev,
345  chain->bound_tex->data[i], NULL);
346  }
347 
348  for (i = 0; i < chain->bound_vert->count; i++)
350  chain->bound_vert->data[i], 0, 0, 0);
351 
352  if (chain->bound_tex)
353  {
354  unsigned_vector_list_free(chain->bound_tex);
355  chain->bound_tex = unsigned_vector_list_new();
356  }
357 
358  if (chain->bound_vert)
359  {
360  unsigned_vector_list_free(chain->bound_vert);
361  chain->bound_vert = unsigned_vector_list_new();
362  }
363 }
364 
366  LPDIRECT3DDEVICE9 dev,
367  struct shader_pass *pass,
368  struct shader_pass *pass2,
369  unsigned width, unsigned height)
370 {
371  if (width != pass->info.tex_w || height != pass->info.tex_h)
372  {
373  d3d9_texture_free(pass->tex);
374 
375  pass->info.tex_w = width;
376  pass->info.tex_h = height;
377  pass->pool = D3DPOOL_DEFAULT;
378  pass->tex = (LPDIRECT3DTEXTURE9)
379  d3d9_texture_new(dev, NULL,
380  width, height, 1,
382  pass2->info.pass->fbo.fp_fbo ?
384  D3DPOOL_DEFAULT, 0, 0, 0,
385  NULL, NULL, false);
386 
387  if (!pass->tex)
388  return false;
389 
390  d3d9_set_texture(dev, 0, pass->tex);
393  d3d9_set_texture(dev, 0, NULL);
394  }
395 
396  return true;
397 }
398 
400  LPDIRECT3DDEVICE9 dev,
401  d3d9_renderchain_t *chain,
402  d3d9_video_t *d3d)
403 {
404  unsigned i;
405  struct LinkInfo link_info;
406  unsigned input_scale = d3d->video_info.input_scale
408  unsigned current_width = input_scale;
409  unsigned current_height = input_scale;
410  unsigned out_width = 0;
411  unsigned out_height = 0;
412 
413  link_info.pass = &d3d->shader.pass[0];
414  link_info.tex_w = current_width;
415  link_info.tex_h = current_height;
416 
417 
419  (struct shader_pass*)&chain->passes->data[0],
420  (struct shader_pass*)&chain->passes->data[
421  chain->passes->count - 1],
422  current_width, current_height))
423  {
424  RARCH_ERR("[D3D9]: Failed to set pass size.\n");
425  return;
426  }
427 
428  for (i = 1; i < d3d->shader.passes; i++)
429  {
431  &link_info,
432  &out_width, &out_height,
433  current_width, current_height, &d3d->final_viewport);
434 
435  link_info.tex_w = next_pow2(out_width);
436  link_info.tex_h = next_pow2(out_height);
437 
439  (struct shader_pass*)&chain->passes->data[i],
440  (struct shader_pass*)&chain->passes->data[
441  chain->passes->count - 1],
442  link_info.tex_w, link_info.tex_h))
443  {
444  RARCH_ERR("[D3D9]: Failed to set pass size.\n");
445  return;
446  }
447 
448  current_width = out_width;
449  current_height = out_height;
450 
451  link_info.pass = &d3d->shader.pass[i];
452  }
453 }
454 
456 {
457  chain->passes = shader_pass_vector_list_new();
458  chain->luts = lut_info_vector_list_new();
459  chain->bound_tex = unsigned_vector_list_new();
460  chain->bound_vert = unsigned_vector_list_new();
461 }
462 
464  LPDIRECT3DTEXTURE9 tex,
465  const void *frame,
466  unsigned tex_width, unsigned tex_height,
467  unsigned width, unsigned height,
468  unsigned last_width, unsigned last_height,
469  unsigned pitch, unsigned pixel_size)
470 {
471  D3DLOCKED_RECT d3dlr = {0, NULL};
472 
473  if (
474  (last_width != width || last_height != height)
475  )
476  {
477  d3d9_lock_rectangle(tex, 0, &d3dlr,
478  NULL, tex_height, D3DLOCK_NOSYSLOCK);
479  d3d9_lock_rectangle_clear(tex, 0, &d3dlr,
480  NULL, tex_height, D3DLOCK_NOSYSLOCK);
481  }
482 
483  if (d3d9_lock_rectangle(tex, 0, &d3dlr, NULL, 0, 0))
484  {
485  d3d9_texture_blit(pixel_size, tex,
486  &d3dlr, frame, width, height, pitch);
488  }
489 }
490 
492 
493 #endif
unsigned last_height
Definition: d3d9_renderchain.h:44
enum _D3DPOOL D3DPOOL
float b
Definition: d3d9_renderchain.h:82
LPDIRECT3DTEXTURE9 tex[TEXTURES]
Definition: d3d9_renderchain.h:91
Vertex _v[4]
Definition: TexturedView.m:14
struct LinkInfo info
Definition: d3d9_renderchain.h:45
struct video_shader_pass * pass
Definition: video_driver.h:83
Definition: d3d9_renderchain.h:77
unsigned ptr
Definition: d3d9_renderchain.h:93
LPDIRECT3DVERTEXBUFFER9 vertex_buf[TEXTURES]
Definition: d3d9_renderchain.h:92
static INLINE void d3d9_vertex_buffer_unlock(LPDIRECT3DVERTEXBUFFER9 vertbuf)
Definition: d3d9_common.h:138
#define INLINE
Definition: retro_inline.h:35
static INLINE void d3d9_set_sampler_minfilter(LPDIRECT3DDEVICE9 dev, unsigned sampler, unsigned value)
Definition: d3d9_common.h:224
#define D3D_DEFAULT_NONPOW2
Definition: d3d9_renderchain.h:31
#define RETRO_BEGIN_DECLS
Definition: retro_common_api.h:41
bool smooth
Definition: d3d9_renderchain.h:39
Definition: d3d8types.h:242
Definition: ffmpeg_core.c:151
rotation
Definition: video_defines.h:62
Definition: d3d8types.h:560
float r
Definition: d3d9_renderchain.h:82
#define RARCH_SCALE_BASE
Definition: video_driver.h:44
Definition: libretro.h:2275
static INLINE void d3d9_recompute_pass_sizes(LPDIRECT3DDEVICE9 dev, d3d9_renderchain_t *chain, d3d9_video_t *d3d)
Definition: d3d9_renderchain.h:399
#define D3D_FILTER_POINT
Definition: d3d9_renderchain.h:33
GLsizei const GLchar ** path
Definition: glext.h:7901
static INLINE void d3d9_renderchain_end_render(d3d9_renderchain_t *chain)
Definition: d3d9_renderchain.h:324
float z
Definition: d3d9_renderchain.h:79
float y
Definition: d3d9_renderchain.h:79
D3DVIEWPORT9 * final_viewport
Definition: d3d9_renderchain.h:98
Definition: video_driver.h:76
LPDIRECT3DTEXTURE9 tex
Definition: d3d9_renderchain.h:47
Definition: video_driver.h:80
unsigned last_height[TEXTURES]
Definition: d3d9_renderchain.h:95
struct IDirect3DVertexDeclaration9 * LPDIRECT3DVERTEXDECLARATION9
Definition: d3d9.h:837
static INLINE void d3d9_texture_free(LPDIRECT3DTEXTURE9 tex)
Definition: d3d9_common.h:191
#define D3DUSAGE_RENDERTARGET
Definition: d3d8types.h:1420
struct shader_pass_vector_list * passes
Definition: d3d9_renderchain.h:99
static INLINE bool d3d9_lock_rectangle(LPDIRECT3DTEXTURE9 tex, unsigned level, D3DLOCKED_RECT *lr, const RECT *rect, unsigned rectangle_height, unsigned flags)
Definition: d3d9_common.h:292
uint64_t frame_count
Definition: d3d9_renderchain.h:88
static INLINE void d3d9_renderchain_set_vertices_on_change(d3d9_renderchain_t *chain, struct shader_pass *pass, unsigned width, unsigned height, unsigned out_width, unsigned out_height, unsigned vp_width, unsigned vp_height, unsigned rotation)
Definition: d3d9_renderchain.h:105
static INLINE bool d3d9_renderchain_set_pass_size(LPDIRECT3DDEVICE9 dev, struct shader_pass *pass, struct shader_pass *pass2, unsigned width, unsigned height)
Definition: d3d9_renderchain.h:365
static INLINE void d3d9_convert_geometry(const struct LinkInfo *info, unsigned *out_width, unsigned *out_height, unsigned width, unsigned height, D3DVIEWPORT9 *final_viewport)
Definition: d3d9_common.h:767
static INLINE bool d3d9_renderchain_add_lut(d3d9_renderchain_t *chain, const char *id, const char *path, bool smooth)
Definition: d3d9_renderchain.h:231
void RARCH_LOG(const char *fmt,...)
Definition: verbosity.c:281
struct unsigned_vector_list * bound_tex
Definition: d3d9_renderchain.h:100
Definition: video_shader_parse.h:71
#define strlcpy(dst, src, size)
Definition: strl.h:46
void * d3d9_vertex_buffer_new(void *_dev, unsigned length, unsigned usage, unsigned fvf, INT32 pool, void *handle)
Definition: d3d9_common.c:294
unsigned tex_w
Definition: video_driver.h:82
enum _D3DFORMAT D3DFORMAT
struct gfx_fbo_scale fbo
Definition: video_shader_parse.h:124
void * attrib_map
Definition: d3d9_renderchain.h:50
static INLINE uint32_t next_pow2(uint32_t v)
Definition: retro_math.h:64
unsigned pixel_size
Definition: d3d9_renderchain.h:87
#define NULL
Pointer to 0.
Definition: gctypes.h:65
void * ftable
Definition: d3d9_renderchain.h:54
struct IDirect3DVertexBuffer9 * LPDIRECT3DVERTEXBUFFER9
Definition: d3d9.h:1274
typedefRETRO_BEGIN_DECLS struct d3d9_video d3d9_video_t
Definition: d3d9_common.h:36
static INLINE void d3d9_set_stream_source(LPDIRECT3DDEVICE9 dev, unsigned stream_no, LPDIRECT3DVERTEXBUFFER9 stream_vertbuf, unsigned offset_bytes, unsigned stride)
Definition: d3d9_common.h:178
unsigned tex_h
Definition: video_driver.h:82
float u
Definition: d3d9_renderchain.h:80
float lut_u
Definition: d3d9_renderchain.h:81
Definition: video_driver.h:77
Definition: d3d8types.h:1343
float lut_v
Definition: d3d9_renderchain.h:81
struct unsigned_vector_list * bound_vert
Definition: d3d9_renderchain.h:101
float v
Definition: d3d9_renderchain.h:80
struct lut_info_vector_list * luts
Definition: d3d9_renderchain.h:102
struct d3d9_renderchain d3d9_renderchain_t
static INLINE void d3d9_unlock_rectangle(LPDIRECT3DTEXTURE9 tex)
Definition: d3d9_common.h:311
void * fprg
Definition: d3d9_renderchain.h:52
LPDIRECT3DVERTEXDECLARATION9 vertex_decl
Definition: d3d9_renderchain.h:49
static INLINE void d3d9_renderchain_destroy_passes_and_luts(d3d9_renderchain_t *chain)
Definition: d3d9_renderchain.h:271
Definition: d3d9types.h:1443
float x
Definition: d3d9_renderchain.h:79
struct IDirect3DTexture9 * LPDIRECT3DTEXTURE9
Definition: d3d9.h:1025
LPDIRECT3DTEXTURE9 tex
Definition: d3d9_renderchain.h:37
#define RETRO_END_DECLS
Definition: retro_common_api.h:42
static INLINE void d3d9_set_sampler_address_u(LPDIRECT3DDEVICE9 dev, unsigned sampler, unsigned value)
Definition: d3d9_common.h:208
#define D3D_FILTER_LINEAR
Definition: d3d9_renderchain.h:32
bool fp_fbo
Definition: video_shader_parse.h:92
static INLINE void d3d9_init_renderchain(d3d9_renderchain_t *chain)
Definition: d3d9_renderchain.h:455
GLuint index
Definition: glext.h:6671
Definition: d3d9_renderchain.h:42
Definition: video_shader_parse.h:70
struct d3d9_renderchain::@247 prev
struct IDirect3DDevice9 * LPDIRECT3DDEVICE9
Definition: d3d9.h:442
LPDIRECT3DVERTEXBUFFER9 vertex_buf
Definition: d3d9_renderchain.h:48
void free(void *)
D3DPOOL pool
Definition: d3d9_renderchain.h:46
void * d3d9_texture_new(void *_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: d3d9_common.c:257
static INLINE bool d3d9_renderchain_add_pass(d3d9_renderchain_t *chain, struct shader_pass *pass, const struct LinkInfo *info)
Definition: d3d9_renderchain.h:189
Definition: d3d8types.h:1506
GLint GLint GLsizei width
Definition: glext.h:6293
float g
Definition: d3d9_renderchain.h:82
static INLINE void d3d9_renderchain_add_lut_internal(d3d9_renderchain_t *chain, unsigned index, unsigned i)
Definition: d3d9_renderchain.h:298
static INLINE void d3d9_set_sampler_address_v(LPDIRECT3DDEVICE9 dev, unsigned sampler, unsigned value)
Definition: d3d9_common.h:216
static INLINE void d3d9_texture_blit(unsigned pixel_size, void *tex, D3DLOCKED_RECT *lr, const void *frame, unsigned width, unsigned height, unsigned pitch)
Definition: d3d9_common.h:416
static INLINE void d3d9_set_texture(LPDIRECT3DDEVICE9 dev, unsigned sampler, LPDIRECT3DTEXTURE9 tex)
Definition: d3d9_common.h:328
LPDIRECT3DDEVICE9 dev
Definition: d3d9_renderchain.h:97
static INLINE INT32 d3d9_get_argb8888_format(void)
Definition: d3d9_common.h:749
static INLINE void d3d9_lock_rectangle_clear(void *tex, unsigned level, D3DLOCKED_RECT *lr, RECT *rect, unsigned rectangle_height, unsigned flags)
Definition: d3d9_common.h:317
void * vtable
Definition: d3d9_renderchain.h:53
void * vprg
Definition: d3d9_renderchain.h:51
#define false
Definition: ordinals.h:83
static INLINE void d3d9_set_sampler_magfilter(LPDIRECT3DDEVICE9 dev, unsigned sampler, unsigned value)
Definition: d3d9_common.h:233
static INLINE void * d3d9_vertex_buffer_lock(LPDIRECT3DVERTEXBUFFER9 vertbuf)
Definition: d3d9_common.h:125
int32_t d3d_translate_filter(unsigned type)
Definition: d3d_common.c:112
static INLINE void d3d9_renderchain_unbind_all(d3d9_renderchain_t *chain)
Definition: d3d9_renderchain.h:331
float a
Definition: d3d9_renderchain.h:82
Definition: d3d9types.h:100
static INLINE void d3d9_renderchain_blit_to_texture(LPDIRECT3DTEXTURE9 tex, const void *frame, unsigned tex_width, unsigned tex_height, unsigned width, unsigned height, unsigned last_width, unsigned last_height, unsigned pitch, unsigned pixel_size)
Definition: d3d9_renderchain.h:463
unsigned last_width
Definition: d3d9_renderchain.h:44
unsigned __int64 uint64_t
Definition: stdint.h:136
unsigned last_width[TEXTURES]
Definition: d3d9_renderchain.h:94
Definition: d3d9_renderchain.h:85
#define D3DLOCK_NOSYSLOCK
Definition: d3d8types.h:1450
static INLINE void d3d9_renderchain_start_render(d3d9_renderchain_t *chain)
Definition: d3d9_renderchain.h:312
Definition: d3d9_renderchain.h:35
#define D3DUSAGE_WRITEONLY
Definition: d3d8types.h:1424
Definition: d3d8types.h:1344
GLint GLint GLsizei GLsizei height
Definition: glext.h:6293
void RARCH_ERR(const char *fmt,...)
Definition: verbosity.c:313
void * memcpy(void *dst, const void *src, size_t len)
Definition: string.c:26