ReactOS 0.4.17-dev-966-gf06eace
wined3d_private.h
Go to the documentation of this file.
1/*
2 * Direct3D wine internal private include file
3 *
4 * Copyright 2002-2003 The wine-d3d team
5 * Copyright 2002-2003 Raphael Junqueira
6 * Copyright 2002-2003, 2004 Jason Edmeades
7 * Copyright 2005 Oliver Stieber
8 * Copyright 2006-2011, 2013 Stefan Dösinger for CodeWeavers
9 *
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2.1 of the License, or (at your option) any later version.
14 *
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#ifndef __WINE_WINED3D_PRIVATE_H
26#define __WINE_WINED3D_PRIVATE_H
27
28#include <assert.h>
29#include <stdarg.h>
30#include <stdbool.h>
31#include <sys/types.h>
32#include <math.h>
33#include <limits.h>
34#include <float.h>
35#define LIBVKD3D_SHADER_SOURCE
36#include <vkd3d_shader.h>
37#include "ntstatus.h"
38#define WIN32_NO_STATUS
39#define COBJMACROS
40#include "windef.h"
41#include "winbase.h"
42#include "winreg.h"
43#include "wingdi.h"
44#include "winuser.h"
45#include "winternl.h"
46#include "ddk/d3dkmthk.h"
47#include "wine/debug.h"
48
49#include "objbase.h"
50#include "wine/wined3d.h"
51#include "wine/list.h"
52#include "wine/rbtree.h"
53
54static inline size_t align(size_t addr, size_t alignment)
55{
56 return (addr + (alignment - 1)) & ~(alignment - 1);
57}
58
59static inline uint32_t float_to_int(float f)
60{
61 union
62 {
63 uint32_t u;
64 float f;
65 } u;
66
67 u.f = f;
68 return u.u;
69}
70
71static inline float int_to_float(uint32_t i)
72{
73 union
74 {
75 uint32_t u;
76 float f;
77 } u;
78
79 u.u = i;
80 return u.f;
81}
82
83static inline const char *wined3d_get_line(const char **ptr, const char *end)
84{
85 const char *p, *q;
86
87 if ((p = *ptr) >= end)
88 return NULL;
89
90 if (!(q = memchr(p, '\n', end - p)))
91 *ptr = end;
92 else
93 *ptr = q + 1;
94 return p;
95}
96
97#define MAKEDWORD_VERSION(maj, min) (((maj & 0xffffu) << 16) | (min & 0xffffu))
98
99#define WINED3D_MAX_DIRTY_REGION_COUNT 7
100
101#define WINED3D_ALPHA_TO_COVERAGE_ENABLE MAKEFOURCC('A','2','M','1')
102#define WINED3D_ALPHA_TO_COVERAGE_DISABLE MAKEFOURCC('A','2','M','0')
103
104#define WINED3D_BITMAP_SIZE(x) (((x) + 31) >> 5)
105
107struct wined3d_adapter;
108struct wined3d_context;
109struct wined3d_state;
111
113{
130};
131
133{
153};
154
155/* Texture format fixups */
156
158{
167};
168
170{
178};
179
180#include <pshpack2.h>
182{
183 unsigned short x_sign_fixup : 1;
184 unsigned short x_source : 3;
185 unsigned short y_sign_fixup : 1;
186 unsigned short y_source : 3;
187 unsigned short z_sign_fixup : 1;
188 unsigned short z_source : 3;
189 unsigned short w_sign_fixup : 1;
190 unsigned short w_source : 3;
191};
192#include <poppack.h>
193
195{
196 unsigned int PrimitiveMiscCaps;
197 unsigned int TextureOpCaps;
198 unsigned int max_blend_stages;
199 unsigned int max_textures;
200};
201
203{
207 unsigned int varying_count;
209 unsigned int active_light_count;
210
211 unsigned int max_rt_count;
212 unsigned int max_clip_distances;
213 unsigned int texture_size;
214 unsigned int sample_count;
216};
217
219{
229 /* If zero, only conditional NPOT textures are supported, via
230 * WINED3D_GL_NORMALIZED_TEXRECT. */
247
249
251};
252
255
257{
258 struct color_fixup_desc fixup =
259 {
264 };
265 return fixup;
266}
267
268static inline BOOL is_identity_fixup(struct color_fixup_desc fixup)
269{
270 return !memcmp(&fixup, &COLOR_FIXUP_IDENTITY, sizeof(fixup));
271}
272
273static inline BOOL is_complex_fixup(struct color_fixup_desc fixup)
274{
276}
277
278static inline BOOL is_scaling_fixup(struct color_fixup_desc fixup)
279{
280 return fixup.x_sign_fixup || fixup.y_sign_fixup || fixup.z_sign_fixup || fixup.w_sign_fixup;
281}
282
284{
285 return f1.x_sign_fixup == f2.x_sign_fixup && f1.x_source == f2.x_source
286 && f1.y_sign_fixup == f2.y_sign_fixup && f1.y_source == f2.y_source
287 && f1.z_sign_fixup == f2.z_sign_fixup && f1.z_source == f2.z_source
288 && f1.w_sign_fixup == f2.w_sign_fixup && f1.w_source == f2.w_source;
289}
290
291static inline enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup)
292{
294 if (fixup.x_source == CHANNEL_SOURCE_COMPLEX1) complex_fixup |= (1u << 0);
295 if (fixup.y_source == CHANNEL_SOURCE_COMPLEX1) complex_fixup |= (1u << 1);
296 if (fixup.z_source == CHANNEL_SOURCE_COMPLEX1) complex_fixup |= (1u << 2);
297 if (fixup.w_source == CHANNEL_SOURCE_COMPLEX1) complex_fixup |= (1u << 3);
298 return complex_fixup;
299}
300
301/* Device caps */
302#define WINED3D_MAX_ACTIVE_LIGHTS 8
303#define WINED3D_MAX_SOFTWARE_ACTIVE_LIGHTS 32
304#define MAX_CONSTANT_BUFFERS 15
305#define MAX_SAMPLER_OBJECTS 16
306#define MAX_SHADER_RESOURCE_VIEWS 128
307#define MAX_UNORDERED_ACCESS_VIEWS 8
308#define MAX_TGSM_REGISTERS 8192
309#define MAX_VERTEX_BLENDS 4
310
313
315{
316 if (func < WINED3D_CMP_NEVER || func > WINED3D_CMP_ALWAYS)
317 return WINED3D_CMP_ALWAYS;
318 return func;
319}
320
321/* float_16_to_32() and float_32_to_16() convert 16 bit floats in the
322 * FLOAT16 data type to standard C floats and vice versa. They do not
323 * depend on the encoding of the C float, so they are platform independent,
324 * but slow. On x86 and other IEEE 754 compliant platforms the conversion
325 * can be accelerated by bit shifting the exponent and mantissa. There are
326 * also some SSE-based assembly routines out there.
327 *
328 * See GL_NV_half_float for a reference of the FLOAT16 / GL_HALF format
329 */
330static inline float float_16_to_32(const unsigned short *in)
331{
332 const unsigned short s = ((*in) & 0x8000u);
333 const unsigned short e = ((*in) & 0x7c00u) >> 10;
334 const unsigned short m = (*in) & 0x3ffu;
335 const float sgn = (s ? -1.0f : 1.0f);
336
337 if(e == 0) {
338 if(m == 0) return sgn * 0.0f; /* +0.0 or -0.0 */
339 else return sgn * powf(2, -14.0f) * ((float)m / 1024.0f);
340 } else if(e < 31) {
341 return sgn * powf(2, (float)e - 15.0f) * (1.0f + ((float)m / 1024.0f));
342 } else {
343 if(m == 0) return sgn * INFINITY;
344 else return NAN;
345 }
346}
347
348static inline float float_24_to_32(DWORD in)
349{
350 const float sgn = in & 0x800000u ? -1.0f : 1.0f;
351 const unsigned short e = (in & 0x780000u) >> 19;
352 const unsigned int m = in & 0x7ffffu;
353
354 if (e == 0)
355 {
356 if (m == 0) return sgn * 0.0f; /* +0.0 or -0.0 */
357 else return sgn * powf(2, -6.0f) * ((float)m / 524288.0f);
358 }
359 else if (e < 15)
360 {
361 return sgn * powf(2, (float)e - 7.0f) * (1.0f + ((float)m / 524288.0f));
362 }
363 else
364 {
365 if (m == 0) return sgn * INFINITY;
366 else return NAN;
367 }
368}
369
370static inline unsigned short float_32_to_16(const float *in)
371{
372 int exp = 0;
373 float tmp = fabsf(*in);
374 unsigned int mantissa;
375 unsigned short ret;
376
377 /* Deal with special numbers */
378 if (*in == 0.0f)
379 return 0x0000;
380 if (isnan(*in))
381 return 0x7c01;
382 if (isinf(*in))
383 return (*in < 0.0f ? 0xfc00 : 0x7c00);
384
385 if (tmp < (float)(1u << 10))
386 {
387 do
388 {
389 tmp = tmp * 2.0f;
390 exp--;
391 } while (tmp < (float)(1u << 10));
392 }
393 else if (tmp >= (float)(1u << 11))
394 {
395 do
396 {
397 tmp /= 2.0f;
398 exp++;
399 } while (tmp >= (float)(1u << 11));
400 }
401
402 mantissa = (unsigned int)tmp;
403 if (tmp - mantissa >= 0.5f)
404 ++mantissa; /* Round to nearest, away from zero. */
405
406 exp += 10; /* Normalize the mantissa. */
407 exp += 15; /* Exponent is encoded with excess 15. */
408
409 if (exp > 30) /* too big */
410 {
411 ret = 0x7c00; /* INF */
412 }
413 else if (exp <= 0)
414 {
415 /* exp == 0: Non-normalized mantissa. Returns 0x0000 (=0.0) for too small numbers. */
416 while (exp <= 0)
417 {
418 mantissa = mantissa >> 1;
419 ++exp;
420 }
421 ret = mantissa & 0x3ff;
422 }
423 else
424 {
425 ret = (exp << 10) | (mantissa & 0x3ff);
426 }
427
428 ret |= ((*in < 0.0f ? 1 : 0) << 15); /* Add the sign */
429 return ret;
430}
431
432static inline unsigned int wined3d_popcount(unsigned int x)
433{
434#if defined(__MINGW32__)
435 return __builtin_popcount(x);
436#else
437 x -= x >> 1 & 0x55555555;
438 x = (x & 0x33333333) + (x >> 2 & 0x33333333);
439 return ((x + (x >> 4)) & 0x0f0f0f0f) * 0x01010101 >> 24;
440#endif
441}
442
444{
445 return (x > y) - (x < y);
446}
447
449{
450 return (x > y) - (x < y);
451}
452
453#define PCI_VENDOR_NONE 0xffff /* e.g. 0x8086 for Intel and 0x10de for Nvidia */
454#define PCI_DEVICE_NONE 0xffff /* e.g. 0x14f for a Geforce6200 */
455
457{
461};
462
463#define WINED3D_CSMT_ENABLE 0x00000001
464#define WINED3D_CSMT_SERIALIZE 0x00000002
465
466/* NOTE: When adding fields to this structure, make sure to update the default
467 * values in wined3d_main.c as well. */
469{
470 unsigned int cs_multithreaded;
471 unsigned int max_gl_version;
472 unsigned short pci_vendor_id;
473 unsigned short pci_device_id;
474 /* Memory tracking and object counting. */
476 char *logo;
478 unsigned int sample_count;
479 unsigned int strict_shader_math;
480 unsigned int max_sm_vs;
481 unsigned int max_sm_hs;
482 unsigned int max_sm_ds;
483 unsigned int max_sm_gs;
484 unsigned int max_sm_ps;
485 unsigned int max_sm_cs;
491};
492
494
496{
508};
509
510#define WINED3D_SHADER_CONST_VS_F 0x00000001
511#define WINED3D_SHADER_CONST_VS_I 0x00000002
512#define WINED3D_SHADER_CONST_VS_B 0x00000004
513#define WINED3D_SHADER_CONST_VS_CLIP_PLANES 0x00000008
514#define WINED3D_SHADER_CONST_VS_POINTSIZE 0x00000010
515#define WINED3D_SHADER_CONST_POS_FIXUP 0x00000020
516#define WINED3D_SHADER_CONST_PS_F 0x00000040
517#define WINED3D_SHADER_CONST_PS_I 0x00000080
518#define WINED3D_SHADER_CONST_PS_B 0x00000100
519#define WINED3D_SHADER_CONST_PS_BUMP_ENV 0x00000200
520#define WINED3D_SHADER_CONST_PS_FOG 0x00000400
521#define WINED3D_SHADER_CONST_PS_ALPHA_TEST 0x00000800
522#define WINED3D_SHADER_CONST_FFP_MODELVIEW 0x00004000
523#define WINED3D_SHADER_CONST_FFP_VERTEXBLEND 0x00008000
524#define WINED3D_SHADER_CONST_FFP_PROJ 0x00010000
525#define WINED3D_SHADER_CONST_FFP_TEXMATRIX 0x00020000
526#define WINED3D_SHADER_CONST_FFP_MATERIAL 0x00040000
527#define WINED3D_SHADER_CONST_FFP_LIGHTS 0x00080000
528#define WINED3D_SHADER_CONST_FFP_PS 0x00100000
529#define WINED3D_SHADER_CONST_FFP_COLOR_KEY 0x00200000
530#define WINED3D_SHADER_CONST_BASE_VERTEX_ID 0x00400000
531
533{
586};
587
589{
599};
600
602{
605};
606
607#define WINED3DSP_NOSWIZZLE (0u | (1u << 2) | (2u << 4) | (3u << 6))
608
610{
625};
626
627#define WINED3DSP_WRITEMASK_0 0x1u /* .x r */
628#define WINED3DSP_WRITEMASK_1 0x2u /* .y g */
629#define WINED3DSP_WRITEMASK_2 0x4u /* .z b */
630#define WINED3DSP_WRITEMASK_3 0x8u /* .w a */
631#define WINED3DSP_WRITEMASK_ALL 0xfu /* all */
632
634{
639};
640
642{
651};
652
653#define WINED3D_PACKED_INTERPOLATION_SIZE 3
654#define WINED3D_PACKED_INTERPOLATION_BIT_COUNT 3
655
657{
661};
662
664{
668};
669
671{
674};
675
677{
681};
682
684{
689};
690
692{
697};
698
699/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
700#define WINED3DSI_TEXLD_PROJECT 0x1
701#define WINED3DSI_TEXLD_BIAS 0x2
702#define WINED3DSI_INDEXED_DYNAMIC 0x4
703#define WINED3DSI_RESINFO_RCP_FLOAT 0x1
704#define WINED3DSI_RESINFO_UINT 0x2
705#define WINED3DSI_SAMPLE_INFO_UINT 0x1
706#define WINED3DSI_SAMPLER_COMPARISON_MODE 0x1
707
708#define WINED3DSI_PRECISE_X 0x100
709#define WINED3DSI_PRECISE_Y 0x200
710#define WINED3DSI_PRECISE_Z 0x400
711#define WINED3DSI_PRECISE_W 0x800
712#define WINED3DSI_PRECISE_XYZW (WINED3DSI_PRECISE_X | WINED3DSI_PRECISE_Y \
713 | WINED3DSI_PRECISE_Z | WINED3DSI_PRECISE_W)
714#define WINED3DSI_PRECISE_SHIFT 8
715
717{
724};
725
727{
731
733{
750};
751
753{
758};
759
761{
762 const char *semantic_name;
763 unsigned int semantic_idx;
764 unsigned int stream_idx;
767 unsigned int register_idx;
769 unsigned int min_precision;
770};
771
773{
774 unsigned int element_count;
776};
777
778#define WINED3D_SM1_VS 0xfffeu
779#define WINED3D_SM1_PS 0xffffu
780#define WINED3D_SM4_PS 0x0000u
781#define WINED3D_SM4_VS 0x0001u
782#define WINED3D_SM4_GS 0x0002u
783#define WINED3D_SM5_HS 0x0003u
784#define WINED3D_SM5_DS 0x0004u
785#define WINED3D_SM5_CS 0x0005u
786
787/* Shader version tokens, and shader end tokens */
788#define WINED3DPS_VERSION(major, minor) ((WINED3D_SM1_PS << 16) | ((major) << 8) | (minor))
789#define WINED3DVS_VERSION(major, minor) ((WINED3D_SM1_VS << 16) | ((major) << 8) | (minor))
790
791/* Shader backends */
792
793#define MAX_ATTRIBS 32
794#define MAX_REG_ADDR 1
795#define MAX_REG_TEXCRD 8
796#define MAX_REG_INPUT 32
797#define MAX_REG_OUTPUT 32
798#define WINED3D_MAX_CBS 15
799
800/* FIXME: This needs to go up to 2048 for
801 * Shader model 3 according to msdn (and for software shaders) */
802#define MAX_LABELS 16
803
804#define MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE 4096
805
807{
808 struct list entry;
809 char *buffer;
810 unsigned int buffer_size;
811 unsigned int content_size;
812};
813
815{
1057
1059{
1063};
1064
1066{
1069 unsigned int flags;
1070 unsigned int stride;
1071};
1072
1073#define WINED3D_SAMPLER_DEFAULT ~0x0u
1074
1076{
1077 unsigned int resource_idx;
1078 unsigned int sampler_idx;
1079 unsigned int bind_idx;
1080};
1081
1083{
1085 size_t size;
1086 size_t count;
1087};
1088
1090{
1091 unsigned int vec4_count;
1093};
1094
1096{
1097 struct list entry;
1098 unsigned int register_idx;
1099 unsigned int register_size;
1100 unsigned int component_count;
1101};
1102
1103#define WINED3D_SHADER_VERSION(major, minor) (((major) << 8) | (minor))
1104
1106{
1108 BYTE texcoord; /* MAX_REG_TEXCRD, 8 */
1109 BYTE address; /* MAX_REG_ADDR, 1 */
1110 WORD labels; /* MAX_LABELS, 16 */
1112 unsigned int temporary_count;
1113 uint32_t *constf; /* pixel, vertex */
1116 union
1117 {
1120 } u;
1121 DWORD input_registers; /* max(MAX_REG_INPUT, MAX_ATTRIBS), 32 */
1122 DWORD output_registers; /* MAX_REG_OUTPUT, 32 */
1123 WORD integer_constants; /* WINED3D_MAX_CONSTS_I, 16 */
1124 WORD boolean_constants; /* WINED3D_MAX_CONSTS_B, 16 */
1125 WORD local_int_consts; /* WINED3D_MAX_CONSTS_I, 16 */
1126 WORD local_bool_consts; /* WINED3D_MAX_CONSTS_B, 16 */
1128 uint32_t cb_map; /* WINED3D_MAX_CBS, 15 */
1129
1134 BYTE bumpmat; /* WINED3D_MAX_FFP_TEXTURES, 8 */
1135 BYTE luminanceparams; /* WINED3D_MAX_FFP_TEXTURES, 8 */
1137 DWORD uav_read_mask : 8; /* MAX_UNORDERED_ACCESS_VIEWS, 8 */
1138 DWORD uav_counter_mask : 8; /* MAX_UNORDERED_ACCESS_VIEWS, 8 */
1139
1140 DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
1141 DWORD cull_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
1161
1162 DWORD rt_mask; /* Used render targets, 32 max. */
1163
1164 /* Whether or not loops are used in this shader, and nesting depth */
1165 unsigned int loop_depth;
1167
1170 unsigned int tgsm_count;
1171};
1172
1173/* Keeps track of details for TEX_M#x# instructions which need to maintain
1174 * state information between multiple instructions. */
1176{
1177 unsigned int current_row;
1178 unsigned int texcoord_w[2];
1179};
1180
1182{
1184 unsigned int current_loop_reg;
1186};
1187
1189{
1190 const struct wined3d_shader *shader;
1196};
1197
1199{
1201 unsigned int offset;
1202};
1203
1205{
1210 union
1211 {
1212 unsigned int immconst_data[4];
1213 unsigned fp_body_idx;
1214 } u;
1215};
1216
1218{
1222 unsigned int shift;
1223};
1224
1226{
1230};
1231
1233{
1235 unsigned int last_register;
1236};
1237
1239{
1243 unsigned int sample_count;
1246};
1247
1249{
1272};
1273
1275{
1278};
1279
1281{
1283 unsigned int byte_stride;
1284};
1285
1287{
1288 unsigned int size;
1289 unsigned int stride;
1290};
1291
1293{
1295 unsigned int byte_count;
1296};
1297
1299{
1301 unsigned int byte_stride;
1302 unsigned int structure_count;
1303};
1304
1306{
1307 unsigned int x, y, z;
1308};
1309
1311{
1312 unsigned int index;
1313 unsigned int array_size;
1314 unsigned int body_count;
1315 unsigned int table_count;
1316};
1317
1319{
1320 signed char u, v, w;
1321};
1322
1324{
1327};
1328
1330{
1334 unsigned int dst_count;
1335 unsigned int src_count;
1343 union
1344 {
1350 unsigned int count;
1351 unsigned int index;
1365};
1366
1368{
1369 return ins->texel_offset.u || ins->texel_offset.v || ins->texel_offset.w;
1370}
1371
1373{
1376};
1377
1379{
1380 unsigned int count;
1381 unsigned int start;
1382 int step;
1383};
1384
1386{
1387 void *(*shader_init)(const DWORD *byte_code, size_t byte_code_size,
1388 const struct wined3d_shader_signature *output_signature);
1390 void (*shader_read_header)(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version);
1392 BOOL (*shader_is_end)(void *data, const DWORD **ptr);
1393};
1394
1397
1399 unsigned int max_shader_version, enum vkd3d_shader_source_type *source_type);
1401 const struct wined3d_stream_output_element *so_element, unsigned int *register_idx,
1402 unsigned int *component_idx);
1403
1405
1406#define WINED3D_SHADER_CAP_DOUBLE_PRECISION 0x00000004u
1407#define WINED3D_SHADER_CAP_OUTPUT_INTERPOLATION 0x00000008u
1408#define WINED3D_SHADER_CAP_FULL_FFP_VARYINGS 0x00000010u
1409
1411{
1412 unsigned int vs_version;
1413 unsigned int hs_version;
1414 unsigned int ds_version;
1415 unsigned int gs_version;
1416 unsigned int ps_version;
1417 unsigned int cs_version;
1418
1419 unsigned int vs_uniform_count;
1420 unsigned int ps_uniform_count;
1422 unsigned int varying_count;
1423
1425};
1426
1428{
1436};
1437
1439{
1443};
1444
1445#define WINED3D_CONST_NUM_UNUSED ~0U
1446
1448{
1453};
1454
1455/* Stateblock dependent parameters which have to be hardcoded
1456 * into the shader code
1457 */
1458
1459#define WINED3D_PSARGS_PROJECTED (1u << 3)
1460#define WINED3D_PSARGS_TEXTRANSFORM_SHIFT 4
1461#define WINED3D_PSARGS_TEXTRANSFORM_MASK 0xfu
1462#define WINED3D_PSARGS_TEXTYPE_SHIFT 2
1463#define WINED3D_PSARGS_TEXTYPE_MASK 0x3u
1464
1465/* Used for Shader Model 1 pixel shaders to track the bound texture type. */
1467{
1472};
1473
1475{
1479 DWORD tex_types; /* ps 1 - 3, 16 textures */
1480 WORD tex_transform; /* ps 1.0-1.3, 4 textures */
1482 WORD shadow; /* WINED3D_MAX_FRAGMENT_SAMPLERS, 16 */
1483 WORD texcoords_initialized; /* WINED3D_MAX_FFP_TEXTURES, 8 */
1487 DWORD rt_alpha_swizzle : 8; /* WINED3D_MAX_RENDER_TARGETS, 8 */
1490};
1491
1493{
1497};
1498
1500{
1501 DWORD swizzle_map; /* MAX_ATTRIBS, 32 */
1510};
1511
1513{
1516 unsigned int output_count : 16;
1517 unsigned int next_shader_type : 3;
1518 unsigned int padding : 13;
1520};
1521
1523{
1524 unsigned int output_count;
1527};
1528
1530{
1532 void (*shader_precompile)(void *shader_priv, struct wined3d_shader *shader);
1534 const struct wined3d_state *state);
1536 const struct wined3d_state *state);
1537 void (*shader_disable)(void *shader_priv, struct wined3d_context *context);
1542 const struct wined3d_fragment_pipe_ops *fragment_pipe);
1547 void (*shader_get_caps)(const struct wined3d_adapter *adapter, struct shader_caps *caps);
1551};
1552
1555
1557
1558#define D3DCOLOR_B_R(dw) (((dw) >> 16) & 0xff)
1559#define D3DCOLOR_B_G(dw) (((dw) >> 8) & 0xff)
1560#define D3DCOLOR_B_B(dw) (((dw) >> 0) & 0xff)
1561#define D3DCOLOR_B_A(dw) (((dw) >> 24) & 0xff)
1562
1563static inline void wined3d_color_from_d3dcolor(struct wined3d_color *wined3d_color, DWORD d3d_color)
1564{
1565 wined3d_color->r = D3DCOLOR_B_R(d3d_color) / 255.0f;
1566 wined3d_color->g = D3DCOLOR_B_G(d3d_color) / 255.0f;
1567 wined3d_color->b = D3DCOLOR_B_B(d3d_color) / 255.0f;
1568 wined3d_color->a = D3DCOLOR_B_A(d3d_color) / 255.0f;
1569}
1570
1571extern const struct wined3d_vec4 wined3d_srgb_const[];
1572
1573static inline float wined3d_srgb_from_linear(float colour)
1574{
1575 if (colour < 0.0f)
1576 return 0.0f;
1577 if (colour < wined3d_srgb_const[1].x)
1578 return colour * wined3d_srgb_const[0].w;
1579 if (colour < 1.0f)
1580 return wined3d_srgb_const[0].y * powf(colour, wined3d_srgb_const[0].x) - wined3d_srgb_const[0].z;
1581 return 1.0f;
1582}
1583
1584static inline void wined3d_colour_srgb_from_linear(struct wined3d_color *colour_srgb,
1585 const struct wined3d_color *colour)
1586{
1587 colour_srgb->r = wined3d_srgb_from_linear(colour->r);
1588 colour_srgb->g = wined3d_srgb_from_linear(colour->g);
1589 colour_srgb->b = wined3d_srgb_from_linear(colour->b);
1590 colour_srgb->a = colour->a;
1591}
1592
1594{
1595 /* client_map_count and map_ptr are accessed from both the client and CS
1596 * threads, and protected by wined3d_device.bo_map_lock. */
1597 struct list users;
1598 void *map_ptr;
1601 unsigned int client_map_count;
1603 /* Number of resources referencing this BO, used for COW tracking.
1604 * If a resource has this BO as a location and wants to write to it, it
1605 * needs to make a copy unless it's the only owner (refcount == 1).
1606 * Deferred contexts may also hold a reference. */
1608};
1609
1611{
1612 struct list entry;
1613 bool valid;
1614};
1615
1617{
1620};
1621
1623{
1625 const BYTE *addr;
1626};
1627
1629{
1630 return (struct wined3d_const_bo_address *)data;
1631}
1632
1634{
1635 const struct wined3d_format *format;
1637 unsigned int stride;
1638 unsigned int stream_idx;
1639 unsigned int divisor;
1641};
1642
1644{
1648 DWORD swizzle_map; /* MAX_ATTRIBS, 32 */
1649 DWORD use_map; /* MAX_ATTRIBS, 32 */
1650};
1651
1653 const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info);
1654
1656{
1657 unsigned int group_count_x;
1658 unsigned int group_count_y;
1659 unsigned int group_count_z;
1660};
1661
1663{
1665 unsigned int offset;
1666};
1667
1669{
1671 union
1672 {
1675 } u;
1676};
1677
1679{
1681 unsigned int start_idx;
1682 unsigned int index_count;
1683 unsigned int start_instance;
1684 unsigned int instance_count;
1685};
1686
1688{
1690 unsigned int offset;
1691};
1692
1694{
1696 union
1697 {
1700 } u;
1702};
1703
1704void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state,
1705 const struct wined3d_draw_parameters *draw_parameters);
1706void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state,
1707 const struct wined3d_dispatch_parameters *dispatch_parameters);
1708
1709#define eps 1e-8f
1710
1711#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num) \
1712 (((((d3dvtVertexType) >> (16 + (2 * (tex_num)))) + 1) & 0x03) + 1)
1713
1714/* Routines and structures related to state management */
1715
1716#define STATE_RENDER(a) (a)
1717#define STATE_IS_RENDER(a) ((a) >= STATE_RENDER(1) && (a) <= STATE_RENDER(WINEHIGHEST_RENDER_STATE))
1718
1719#define STATE_TEXTURESTAGE(stage, num) \
1720 (STATE_RENDER(WINEHIGHEST_RENDER_STATE) + 1 + (stage) * (WINED3D_HIGHEST_TEXTURE_STATE + 1) + (num))
1721#define STATE_IS_TEXTURESTAGE(a) \
1722 ((a) >= STATE_TEXTURESTAGE(0, 1) && (a) <= STATE_TEXTURESTAGE(WINED3D_MAX_FFP_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE))
1723
1724#define STATE_GRAPHICS_SHADER(a) (STATE_TEXTURESTAGE(WINED3D_MAX_FFP_TEXTURES - 1, WINED3D_HIGHEST_TEXTURE_STATE) + 1 + (a))
1725#define STATE_IS_GRAPHICS_SHADER(a) \
1726 ((a) >= STATE_GRAPHICS_SHADER(0) && (a) < STATE_GRAPHICS_SHADER(WINED3D_SHADER_TYPE_GRAPHICS_COUNT))
1727
1728#define STATE_GRAPHICS_CONSTANT_BUFFER(a) (STATE_GRAPHICS_SHADER(WINED3D_SHADER_TYPE_GRAPHICS_COUNT) + (a))
1729#define STATE_IS_GRAPHICS_CONSTANT_BUFFER(a) \
1730 ((a) >= STATE_GRAPHICS_CONSTANT_BUFFER(0) \
1731 && (a) < STATE_GRAPHICS_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_GRAPHICS_COUNT))
1732
1733#define STATE_GRAPHICS_SHADER_RESOURCE_BINDING (STATE_GRAPHICS_CONSTANT_BUFFER(WINED3D_SHADER_TYPE_GRAPHICS_COUNT))
1734#define STATE_IS_GRAPHICS_SHADER_RESOURCE_BINDING(a) ((a) == STATE_GRAPHICS_SHADER_RESOURCE_BINDING)
1735
1736#define STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING (STATE_GRAPHICS_SHADER_RESOURCE_BINDING + 1)
1737#define STATE_IS_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING(a) ((a) == STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING)
1738
1739#define STATE_STREAMSRC (STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING + 1)
1740#define STATE_IS_STREAMSRC(a) ((a) == STATE_STREAMSRC)
1741#define STATE_INDEXBUFFER (STATE_STREAMSRC + 1)
1742#define STATE_IS_INDEXBUFFER(a) ((a) == STATE_INDEXBUFFER)
1743
1744#define STATE_VDECL (STATE_INDEXBUFFER + 1)
1745#define STATE_IS_VDECL(a) ((a) == STATE_VDECL)
1746
1747#define STATE_VIEWPORT (STATE_VDECL + 1)
1748#define STATE_IS_VIEWPORT(a) ((a) == STATE_VIEWPORT)
1749
1750#define STATE_SCISSORRECT (STATE_VIEWPORT + 1)
1751#define STATE_IS_SCISSORRECT(a) ((a) == STATE_SCISSORRECT)
1752
1753#define STATE_CLIPPLANE(a) (STATE_SCISSORRECT + 1 + (a))
1754#define STATE_IS_CLIPPLANE(a) ((a) >= STATE_CLIPPLANE(0) && (a) <= STATE_CLIPPLANE(WINED3D_MAX_CLIP_DISTANCES - 1))
1755
1756#define STATE_RASTERIZER (STATE_CLIPPLANE(WINED3D_MAX_CLIP_DISTANCES))
1757#define STATE_IS_RASTERIZER(a) ((a) == STATE_RASTERIZER)
1758
1759#define STATE_DEPTH_BOUNDS (STATE_RASTERIZER + 1)
1760#define STATE_IS_DEPTH_BOUNDS(a) ((a) == STATE_DEPTH_BOUNDS)
1761
1762#define STATE_BASEVERTEXINDEX (STATE_DEPTH_BOUNDS + 1)
1763#define STATE_IS_BASEVERTEXINDEX(a) ((a) == STATE_BASEVERTEXINDEX)
1764
1765#define STATE_FRAMEBUFFER (STATE_BASEVERTEXINDEX + 1)
1766#define STATE_IS_FRAMEBUFFER(a) ((a) == STATE_FRAMEBUFFER)
1767
1768#define STATE_STREAM_OUTPUT (STATE_FRAMEBUFFER + 1)
1769#define STATE_IS_STREAM_OUTPUT(a) ((a) == STATE_STREAM_OUTPUT)
1770
1771#define STATE_BLEND (STATE_STREAM_OUTPUT + 1)
1772#define STATE_IS_BLEND(a) ((a) == STATE_BLEND)
1773
1774#define STATE_BLEND_FACTOR (STATE_BLEND + 1)
1775#define STATE_IS_BLEND_FACTOR(a) ((a) == STATE_BLEND_FACTOR)
1776
1777#define STATE_SAMPLE_MASK (STATE_BLEND_FACTOR + 1)
1778#define STATE_IS_SAMPLE_MASK(a) ((a) == STATE_SAMPLE_MASK)
1779
1780#define STATE_DEPTH_STENCIL (STATE_SAMPLE_MASK + 1)
1781#define STATE_IS_DEPTH_STENCIL(a) ((a) == STATE_DEPTH_STENCIL)
1782
1783#define STATE_STENCIL_REF (STATE_DEPTH_STENCIL + 1)
1784#define STATE_IS_STENCIL_REF(a) ((a) == STATE_STENCIL_REF)
1785
1786#define STATE_COMPUTE_OFFSET (STATE_STENCIL_REF + 1)
1787
1788#define STATE_COMPUTE_SHADER (STATE_COMPUTE_OFFSET)
1789#define STATE_IS_COMPUTE_SHADER(a) ((a) == STATE_COMPUTE_SHADER)
1790
1791#define STATE_COMPUTE_CONSTANT_BUFFER (STATE_COMPUTE_SHADER + 1)
1792#define STATE_IS_COMPUTE_CONSTANT_BUFFER(a) ((a) == STATE_COMPUTE_CONSTANT_BUFFER)
1793
1794#define STATE_COMPUTE_SHADER_RESOURCE_BINDING (STATE_COMPUTE_CONSTANT_BUFFER + 1)
1795#define STATE_IS_COMPUTE_SHADER_RESOURCE_BINDING(a) ((a) == STATE_COMPUTE_SHADER_RESOURCE_BINDING)
1796
1797#define STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING (STATE_COMPUTE_SHADER_RESOURCE_BINDING + 1)
1798#define STATE_IS_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING(a) ((a) == STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING)
1799
1800#define STATE_COMPUTE_HIGHEST (STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING)
1801#define STATE_HIGHEST (STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING)
1802
1803#define STATE_IS_COMPUTE(a) ((a) >= STATE_COMPUTE_OFFSET && (a) <= STATE_COMPUTE_HIGHEST)
1804#define STATE_COMPUTE_COUNT (STATE_COMPUTE_HIGHEST - STATE_COMPUTE_OFFSET + 1)
1805
1806#define STATE_SHADER(a) ((a) != WINED3D_SHADER_TYPE_COMPUTE ? STATE_GRAPHICS_SHADER(a) : STATE_COMPUTE_SHADER)
1807#define STATE_CONSTANT_BUFFER(a) \
1808 ((a) != WINED3D_SHADER_TYPE_COMPUTE ? STATE_GRAPHICS_CONSTANT_BUFFER(a) : STATE_COMPUTE_CONSTANT_BUFFER)
1809#define STATE_UNORDERED_ACCESS_VIEW_BINDING(a) ((a) == WINED3D_PIPELINE_GRAPHICS ? \
1810 STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING : STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING)
1811
1815};
1816
1817/* Direct3D terminology with little modifications. We do not have an issued
1818 * state because only the driver knows about it, but we have a created state
1819 * because D3D allows GetData() on a created query, but OpenGL doesn't. */
1821{
1826
1828{
1832};
1833
1835{
1837
1838 void *parent;
1843 const void *data;
1846
1849
1850 /* FIXME: This is GL-specific. */
1851 unsigned int buffer_object;
1854};
1855
1856#define WINED3D_QUERY_POOL_SIZE 256
1857
1859{
1860 unsigned int offset;
1861 unsigned int size;
1862};
1863
1865{
1868};
1869
1871{
1876
1879 struct
1880 {
1882 unsigned int sub_resource_idx;
1884
1885 /* Stores some information about the context state for optimization */
1886 DWORD last_swizzle_map; /* MAX_ATTRIBS, 32 */
1887
1888 DWORD shader_update_mask : 6; /* WINED3D_SHADER_TYPE_COUNT, 6 */
1891 DWORD last_was_rhw : 1; /* True iff last draw_primitive was in xyzrhw mode. */
1895 DWORD lowest_disabled_stage : 4; /* Max WINED3D_MAX_FFP_TEXTURES, 8 */
1896
1897 DWORD fixed_function_usage_map : 8; /* WINED3D_MAX_FFP_TEXTURES, 8 */
1911
1912 DWORD clip_distance_mask : 8; /* WINED3D_MAX_CLIP_DISTANCES, 8 */
1913
1917
1918
1920
1922
1923 unsigned int viewport_count;
1925};
1926
1928void wined3d_context_init(struct wined3d_context *context, struct wined3d_swapchain *swapchain);
1930
1932 struct wined3d_swapchain *swapchain);
1933
1934typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id);
1935
1937{
1938 unsigned int representative;
1940};
1941
1943{
1944 unsigned int state;
1946 unsigned int extension;
1947};
1948
1949#define GL_EXT_EMUL_ARB_MULTITEXTURE 0x00000001
1950#define GL_EXT_EMUL_EXT_FOG_COORD 0x00000002
1951
1953{
1956 void (*get_caps)(const struct wined3d_adapter *adapter, struct fragment_caps *caps);
1957 unsigned int (*get_emul_mask)(const struct wined3d_adapter *adapter);
1958 void *(*alloc_private)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv);
1964};
1965
1967{
1976};
1977
1979{
1983 unsigned int (*vp_get_emul_mask)(const struct wined3d_adapter *adapter);
1984 void *(*vp_alloc)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv);
1987};
1988
1992
1994
1995extern const struct wined3d_vertex_pipe_ops none_vertex_pipe;
1996extern const struct wined3d_vertex_pipe_ops glsl_vertex_pipe;
1997
1999
2000/* "Base" state table */
2002 const struct wined3d_d3d_info *d3d_info, const BOOL *supported_extensions,
2003 const struct wined3d_vertex_pipe_ops *vertex, const struct wined3d_fragment_pipe_ops *fragment,
2004 const struct wined3d_state_entry_template *misc);
2005
2007{
2013};
2014
2016{
2019};
2020
2022{
2025 unsigned int rt_count, const struct wined3d_fb_state *fb, unsigned int rect_count, const RECT *clear_rects,
2026 const RECT *draw_rect, uint32_t flags, const struct wined3d_color *colour, float depth, unsigned int stencil);
2028 struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, DWORD src_location,
2029 const RECT *src_rect, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
2030 DWORD dst_location, const RECT *dst_rect, const struct wined3d_color_key *colour_key,
2031 enum wined3d_texture_filter_type filter, const struct wined3d_format *resolve_format);
2032};
2033
2036
2037void cpu_blitter_clear_texture(struct wined3d_texture *texture, unsigned int sub_resource_idx,
2038 const struct wined3d_box *box, const struct wined3d_color *colour);
2039
2040BOOL wined3d_clip_blit(const RECT *clip_rect, RECT *clipped, RECT *other);
2041
2043void context_invalidate_state(struct wined3d_context *context, unsigned int state_id);
2046 unsigned int sub_resource_idx);
2049 const struct wined3d_state *state, DWORD state_id);
2051 const struct wined3d_state *state, DWORD state_id);
2052
2054{
2055 /* Padding is needed for the HLSL backend. */
2057 struct wined3d_vec4 position, direction;
2060};
2061
2062/*****************************************************************************
2063 * Internal representation of a light
2064 */
2066{
2067 struct wined3d_light OriginalParms; /* Note D3D8LIGHT == D3D9LIGHT */
2068 unsigned int OriginalIndex;
2071
2072 /* Computed constants used by the vertex pipe. */
2074
2078};
2079
2080/* The default light parameters */
2081extern const struct wined3d_light WINED3D_default_light;
2082
2084{
2085 int iPixelFormat; /* WGL pixel format */
2086 int iPixelType; /* WGL pixel type e.g. WGL_TYPE_RGBA_ARB, WGL_TYPE_RGBA_FLOAT_ARB or WGL_TYPE_COLORINDEX_ARB */
2094};
2095
2097{
2104};
2105
2107{
2108 CARD_WINE = 0x0000,
2109
2173
2189 CARD_NVIDIA_GEFORCE_7300 = 0x01d7, /* GeForce Go 7300 */
2193 CARD_NVIDIA_GEFORCE_8200 = 0x0849, /* Other PCI ID 0x084b */
2286 CARD_NVIDIA_GEFORCE_GTX860M = 0x1392, /* Other PCI ID 0x119a */
2347
2349
2351
2432};
2433
2434/* The driver names reflect the lowest GPU supported
2435 * by a certain driver, so DRIVER_AMD_R300 supports
2436 * R3xx, R4xx and R5xx GPUs. */
2438{
2460};
2461
2463{
2466 const char *description;
2468 unsigned int vidmem;
2469};
2470
2476 enum wined3d_feature_level feature_level);
2477
2478/* 512 in Direct3D 8/9, 128 in DXGI. */
2479#define WINED3D_MAX_DEVICE_IDENTIFIER_LENGTH 512
2480
2482{
2485 const char *name;
2489 unsigned int version_high;
2490 unsigned int version_low;
2491};
2492
2493bool wined3d_driver_info_init(struct wined3d_driver_info *driver_info,
2494 const struct wined3d_gpu_description *gpu_description, enum wined3d_feature_level feature_level,
2495 UINT64 vram_bytes, UINT64 sysmem_bytes);
2496
2497#define UPLOAD_BO_UPLOAD_ON_UNMAP 0x1
2498#define UPLOAD_BO_RENAME_ON_UNMAP 0x2
2499#define UPLOAD_BO_FREE_ON_UNMAP 0x4
2500
2502{
2505};
2506
2508{
2511 enum wined3d_device_type device_type, HWND focus_window, unsigned int flags,
2512 BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count,
2513 struct wined3d_device_parent *device_parent, struct wined3d_device **device);
2515 struct wined3d_context *(*adapter_acquire_context)(struct wined3d_device *device,
2516 struct wined3d_texture *texture, unsigned int sub_resource_idx);
2520 const struct wined3d_format *adapter_format, const struct wined3d_format *rt_format,
2521 const struct wined3d_format *ds_format);
2524 void *(*adapter_map_bo_address)(struct wined3d_context *context,
2525 const struct wined3d_bo_address *data, size_t size, uint32_t map_flags);
2527 unsigned int range_count, const struct wined3d_range *ranges);
2529 const struct wined3d_bo_address *dst, const struct wined3d_bo_address *src,
2530 unsigned int range_count, const struct wined3d_range *ranges, uint32_t map_flags);
2532 const struct wined3d_const_bo_address *data, size_t size);
2534 unsigned int sub_resource_idx, struct wined3d_bo_address *addr);
2537 const struct wined3d_swapchain_desc *desc,
2538 struct wined3d_swapchain_state_parent *state_parent, void *parent,
2539 const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain);
2542 const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops,
2543 struct wined3d_buffer **buffer);
2546 unsigned int layer_count, unsigned int level_count, uint32_t flags, void *parent,
2547 const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture);
2550 struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops,
2554 struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops,
2558 struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops,
2562 void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler);
2565 void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query);
2569 const struct wined3d_draw_parameters *parameters);
2573 struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, bool fp);
2575};
2576
2578{
2579 unsigned int ordinal;
2583
2586
2590};
2591
2593
2594#ifdef _WIN64
2595#define MAX_PERSISTENT_MAPPED_BYTES I64_MAX
2596#else
2597#define MAX_PERSISTENT_MAPPED_BYTES (128 * 1024 * 1024)
2598#endif
2599
2600/* The adapter structure */
2602{
2603 unsigned int ordinal;
2604
2614
2615 void *formats;
2617
2619
2625};
2626
2627BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal, const LUID *luid,
2628 const struct wined3d_adapter_ops *adapter_ops);
2631
2633 unsigned int wined3d_creation_flags);
2634
2636 unsigned int wined3d_creation_flags);
2637
2641
2643{
2648
2649/*****************************************************************************
2650 * Fixed function pipeline replacements
2651 */
2652#define ARG_UNUSED 0xff
2654{
2655 unsigned cop : 8;
2656 unsigned carg1 : 8;
2657 unsigned carg2 : 8;
2658 unsigned carg0 : 8;
2659
2660 unsigned aop : 8;
2661 unsigned aarg1 : 8;
2662 unsigned aarg2 : 8;
2663 unsigned aarg0 : 8;
2664
2666 unsigned tex_type : 3;
2667 unsigned tmp_dst : 1;
2668 unsigned projected : 2;
2669 unsigned padding : 10;
2670};
2671
2673{
2675 unsigned char fog; /* enum wined3d_ffp_ps_fog_mode */
2676 unsigned char sRGB_write;
2678 unsigned char color_key_enabled : 1;
2679 unsigned char pointsprite : 1;
2680 unsigned char flatshading : 1;
2681 unsigned char alpha_test_func : 3;
2682 unsigned char padding : 2;
2683};
2684
2686{
2689};
2690
2691int wined3d_ffp_frag_program_key_compare(const void *key, const struct wine_rb_entry *entry);
2692int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry);
2693
2695{
2698};
2699
2701
2703 const struct wined3d_d3d_info *d3d_info, struct ffp_frag_settings *settings);
2704const struct ffp_frag_desc *find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders,
2705 const struct ffp_frag_settings *settings);
2707void wined3d_ftoa(float value, char *s);
2708
2710{
2715};
2716
2717#define WINED3D_FFP_TCI_SHIFT 16
2718#define WINED3D_FFP_TCI_MASK 0xffu
2719
2720#define WINED3D_FFP_LIGHT_TYPE_SHIFT(idx) (3 * (idx))
2721#define WINED3D_FFP_LIGHT_TYPE_MASK 0x7u
2722
2724{
2740
2744 DWORD texcoords : 8; /* WINED3D_MAX_FFP_TEXTURES */
2750
2751 DWORD swizzle_map; /* MAX_ATTRIBS, 32 */
2752
2754};
2755
2757{
2760};
2761
2763{
2766};
2767
2768void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct wined3d_stream_info *si,
2769 const struct wined3d_d3d_info *d3d_info, struct wined3d_ffp_vs_settings *settings);
2770
2772{
2774 unsigned int flags;
2775 unsigned int adapter_count;
2777};
2778
2782
2783BOOL wined3d_get_app_name(char *app_name, unsigned int app_name_size);
2784
2785/* Direct3D 1-9 shader constants are submitted by internally feeding them into
2786 * wined3d_buffer objects, which are updated with
2787 * wined3d_device_context_emit_update_sub_resource().
2788 * This allows Vulkan backend shaders to read from the buffers as they would
2789 * any other uniform buffer, with no extra code needed to set up the descriptor
2790 * set and bind buffers. Other renderers simply map the buffers as CPU buffers
2791 * and read from them directly.
2792 *
2793 * The "FFP" buffer contains constants that are part of the D3D1-9 FFP pipe,
2794 * i.e. only used when shaders are disabled.
2795 */
2796
2798{
2800 {
2802 struct
2803 {
2811 {
2813 float size;
2816 float padding[3]; /* For the HLSL backend. */
2818 {
2822};
2823
2825{
2828 /* (1, 1, 1, 0) or (0, 0, 0, 0), which shaders will multiply with the
2829 * specular color. */
2833 {
2834 struct
2835 {
2836 float _00, _01, _10, _11;
2841
2842 /* States not used by the HLSL pipeline. */
2844 float padding[3]; /* to align to 16 bytes */
2845};
2846
2847/* Float/int/bool constants are bound to VKD3D_SHADER_D3DBC_*_CONSTANT_REGISTER
2848 * which have the values 0/1/2 respectively.
2849 * FFP uniform constants active even with shaders (e.g. alpha test ref) need to
2850 * be additionally bound to a different slot. */
2851#define WINED3D_FFP_CONSTANTS_EXTRA_REGISTER 3
2852
2854{
2864};
2865
2867{
2871
2872 void *parent;
2874
2877};
2878
2879static inline unsigned int wined3d_blend_state_get_writemask(const struct wined3d_blend_state *state,
2880 unsigned int index)
2881{
2882 if (!state)
2883 return 0xf;
2884 if (!state->desc.independent)
2885 index = 0;
2886 return state->desc.rt[index].writemask;
2887}
2888
2890{
2893
2895
2896 void *parent;
2898
2901};
2902
2904{
2907
2908 void *parent;
2910
2913};
2914
2916{
2919};
2920
2921#define WINED3D_STATE_NO_REF 0x00000001
2922#define WINED3D_STATE_INIT_DEFAULT 0x00000002
2923
2925{
2929
2935 unsigned int index_offset;
2937 int load_base_vertex_index; /* Non-indexed drawing needs 0 here, indexed needs base_vertex_index. */
2942
2948
2950
2954 unsigned int viewport_count;
2957
2959
2965 unsigned int stencil_ref;
2969};
2970
2971void state_cleanup(struct wined3d_state *state);
2972void state_init(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info,
2973 uint32_t flags, enum wined3d_feature_level feature_level);
2975
2976static inline void wined3d_state_reset(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
2977{
2978 enum wined3d_feature_level feature_level = state->feature_level;
2979 uint32_t flags = state->flags;
2980
2981 memset(state, 0, sizeof(*state));
2982 state_init(state, d3d_info, flags, feature_level);
2983}
2984
2985static inline bool wined3d_state_uses_depth_buffer(const struct wined3d_state *state)
2986{
2987 if (!state->depth_stencil_state)
2988 return true;
2989 return state->depth_stencil_state->desc.depth || state->depth_stencil_state->desc.depth_write
2990 || state->depth_stencil_state->desc.stencil;
2991}
2992
2993#define WINED3D_UNMAPPED_STAGE ~0u
2994
2995/* Multithreaded flag. Removed from the public header to signal that
2996 * wined3d_device_create() ignores it. */
2997#define WINED3DCREATE_MULTITHREADED 0x00000004
2998
3000{
3004};
3005
3007{
3009
3010 /* WineD3D Information */
3014
3020 /* Array of functions for states which are handled by more than one pipeline part */
3023
3026 BYTE inScene : 1; /* A flag to check for proper BeginScene / EndScene call pairs */
3027 BYTE softwareVertexProcessing : 1; /* process vertex shaders using software or hardware */
3030
3031 unsigned char surface_alignment; /* Line Alignment of surfaces */
3032
3034
3035 /* Internal use fields */
3038
3042 unsigned int max_frame_latency;
3043
3044 struct list resources; /* a linked list to track resources created by the device */
3045 struct list shaders; /* a linked list to track shaders (pixel and vertex) */
3047 struct wine_rb_tree samplers, rasterizer_states, blend_states, depth_stencil_states;
3048 struct wine_rb_tree ffp_vertex_shaders, ffp_pixel_shaders;
3049
3050 /* Render Target Support */
3052
3053 /* Cursor management */
3061
3062 /* The Wine logo texture */
3064
3065 /* Default sampler used to emulate the direct resource access without using wined3d_sampler */
3068
3069 /* Command stream */
3071
3073
3074 /* Context management */
3077
3079};
3080
3085 struct wined3d_context *context);
3088 unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags,
3089 BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count,
3090 const BOOL *supported_extensions, struct wined3d_device_parent *device_parent);
3095void device_invalidate_state(const struct wined3d_device *device, unsigned int state);
3099
3101{
3102 EnterCriticalSection(&device->bo_map_lock);
3103}
3104
3106{
3107 LeaveCriticalSection(&device->bo_map_lock);
3108}
3109
3111{
3113
3115};
3116
3118{
3120}
3121
3122#define WINED3D_ALLOCATOR_CHUNK_SIZE (64 * 1024 * 1024)
3123#define WINED3D_ALLOCATOR_CHUNK_ORDER_COUNT 15
3124#define WINED3D_ALLOCATOR_MIN_BLOCK_SIZE (WINED3D_ALLOCATOR_CHUNK_SIZE >> (WINED3D_ALLOCATOR_CHUNK_ORDER_COUNT - 1))
3125#define WINED3D_SLAB_BO_MIN_OBJECT_ALIGN 16
3126#define WINED3D_RETIRED_BO_SIZE_THRESHOLD (64 * 1024 * 1024)
3127
3129{
3130 struct list entry;
3133 unsigned int map_count;
3134 void *map_ptr;
3135};
3136
3140
3142{
3143 struct list entry;
3146 unsigned int order;
3147 size_t offset;
3148 bool free;
3149};
3150
3152
3154{
3155 struct list chunks;
3156};
3157
3159{
3160 struct wined3d_allocator_chunk *(*allocator_create_chunk)(struct wined3d_allocator *allocator,
3161 struct wined3d_context *context, unsigned int memory_type, size_t chunk_size);
3163};
3164
3166{
3171};
3172
3174 struct wined3d_context *context, unsigned int memory_type, size_t size);
3177 size_t pool_count, const struct wined3d_allocator_ops *allocator_ops);
3178
3180const char *wined3d_debug_bind_flags(uint32_t bind_flags);
3181const char *wined3d_debug_view_desc(const struct wined3d_view_desc *d,
3182 const struct wined3d_resource *resource);
3183
3184static inline ULONG wined3d_atomic_decrement_mutex_lock(volatile LONG *refcount)
3185{
3186 ULONG count, old_count = *refcount;
3187 do
3188 {
3189 if ((count = old_count) == 1)
3190 {
3192 count = InterlockedDecrement(refcount);
3194 return count;
3195 }
3196
3197 old_count = InterlockedCompareExchange(refcount, count - 1, count);
3198 }
3199 while (old_count != count);
3200
3201 return count - 1;
3202}
3203
3204#define CLIENT_BO_DISCARDED ((struct wined3d_bo *)~(UINT_PTR)0)
3205
3207{
3208 /* The resource's persistently mapped address, which we may use to perform
3209 * NOOVERWRITE maps from the client thread. */
3211
3212 /* The currently mapped upload BO, if applicable, and box. */
3215};
3216
3218{
3220}
3221
3223{
3229 unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc);
3231 unsigned int sub_resource_idx, unsigned int *row_pitch, unsigned int *slice_pitch);
3232 HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
3233 void **map_ptr, const struct wined3d_box *box, uint32_t flags);
3234 HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx);
3235};
3236
3238{
3246 const struct wined3d_format *format;
3247 unsigned int format_attrs;
3248 unsigned int format_caps;
3252 unsigned int bind_flags;
3253 unsigned int access;
3260 unsigned int priority;
3263
3265
3267
3268 void *parent;
3271
3273
3276};
3277
3279{
3280 return resource->resource_ops->resource_incref(resource);
3281}
3282
3284{
3285 return resource->resource_ops->resource_decref(resource);
3286}
3287
3289 unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
3290{
3291 return resource->resource_ops->resource_sub_resource_get_desc(resource, sub_resource_idx, desc);
3292}
3293
3295 unsigned int sub_resource_idx, unsigned int *row_pitch, unsigned int *slice_pitch)
3296{
3297 resource->resource_ops->resource_sub_resource_get_map_pitch(resource, sub_resource_idx, row_pitch, slice_pitch);
3298}
3299
3302 enum wined3d_resource_type type, const struct wined3d_format *format,
3303 enum wined3d_multisample_type multisample_type, unsigned int multisample_quality, unsigned int usage,
3304 unsigned int bind_flags, unsigned int access, unsigned int width, unsigned int height, unsigned int depth,
3305 unsigned int size, void *parent, const struct wined3d_parent_ops *parent_ops,
3306 const struct wined3d_resource_ops *resource_ops);
3307void *resource_offset_map_pointer(struct wined3d_resource *resource, unsigned int sub_resource_idx,
3308 uint8_t *base_memory, const struct wined3d_box *box);
3311 unsigned int sub_resource_idx, const struct wined3d_box *box);
3314 const struct wined3d_resource *resource);
3320 const struct wined3d_map_desc *map, const struct wined3d_color *colour,
3321 const struct wined3d_box *box, bool full_subresource);
3322
3323/* Tests show that the start address of resources is 32 byte aligned */
3324#define RESOURCE_ALIGNMENT 16
3325#define WINED3D_CONSTANT_BUFFER_ALIGNMENT 16
3326
3327#define WINED3D_LOCATION_DISCARDED 0x00000001
3328#define WINED3D_LOCATION_SYSMEM 0x00000002
3329#define WINED3D_LOCATION_CLEARED 0x00000004
3330#define WINED3D_LOCATION_BUFFER 0x00000008
3331#define WINED3D_LOCATION_TEXTURE_RGB 0x00000010
3332#define WINED3D_LOCATION_TEXTURE_SRGB 0x00000020
3333#define WINED3D_LOCATION_DRAWABLE 0x00000040
3334#define WINED3D_LOCATION_RB_MULTISAMPLE 0x00000080
3335#define WINED3D_LOCATION_RB_RESOLVED 0x00000100
3336
3338
3340{
3341 BOOL (*texture_prepare_location)(struct wined3d_texture *texture, unsigned int sub_resource_idx,
3342 struct wined3d_context *context, unsigned int location);
3343 BOOL (*texture_load_location)(struct wined3d_texture *texture, unsigned int sub_resource_idx,
3344 struct wined3d_context *context, unsigned int location);
3346 struct wined3d_context *context, unsigned int location);
3348 const struct wined3d_format *src_format, const struct wined3d_box *src_box, unsigned int src_row_pitch,
3349 unsigned int src_slice_pitch, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
3350 unsigned int dst_location, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z);
3352 unsigned int src_sub_resource_idx, unsigned int src_location, const struct wined3d_box *src_box,
3353 const struct wined3d_bo_address *dst_bo_addr, const struct wined3d_format *dst_format,
3354 unsigned int dst_x, unsigned int dst_y, unsigned int dst_z,
3355 unsigned int dst_row_pitch, unsigned int dst_slice_pitch);
3356};
3357
3358#define WINED3D_TEXTURE_COND_NP2 0x00000001
3359#define WINED3D_TEXTURE_IS_SRGB 0x00000008
3360#define WINED3D_TEXTURE_RGB_ALLOCATED 0x00000010
3361#define WINED3D_TEXTURE_RGB_VALID 0x00000020
3362#define WINED3D_TEXTURE_SRGB_ALLOCATED 0x00000040
3363#define WINED3D_TEXTURE_SRGB_VALID 0x00000080
3364#define WINED3D_TEXTURE_CONVERTED 0x00000100
3365#define WINED3D_TEXTURE_GET_DC_LENIENT 0x00000800
3366#define WINED3D_TEXTURE_DC_IN_USE 0x00001000
3367#define WINED3D_TEXTURE_DISCARD 0x00002000
3368#define WINED3D_TEXTURE_GET_DC 0x00004000
3369#define WINED3D_TEXTURE_GENERATE_MIPMAPS 0x00008000
3370#define WINED3D_TEXTURE_DOWNLOADABLE 0x00010000
3371
3372#define WINED3D_TEXTURE_ASYNC_COLOR_KEY 0x00000001
3373
3375{
3380 unsigned int level_count;
3381 unsigned int download_count;
3382 unsigned int sysmem_count;
3383 unsigned int lod;
3386
3387 unsigned int row_pitch;
3388 unsigned int slice_pitch;
3389
3391
3392 /* May only be accessed from the command stream worker thread. */
3394 {
3396
3397 /* Color keys for DDraw */
3405
3406 /* Color key field accessed from the client side. */
3409
3411 {
3414 unsigned int box_count;
3416
3418 {
3419 struct list entry;
3426
3428 {
3432
3434 {
3435 void *parent;
3437
3438 unsigned int offset;
3439 unsigned int size;
3440
3441 unsigned int map_count;
3445 union
3446 {
3448 struct
3449 {
3450 float depth;
3451 unsigned int stencil;
3452 };
3454
3457};
3458
3459static inline void *wined3d_texture_allocate_object_memory(SIZE_T s, SIZE_T level_count, SIZE_T layer_count)
3460{
3461 struct wined3d_texture *t;
3462
3463 if (level_count > ((~(SIZE_T)0 - s) / sizeof(*t->sub_resources)) / layer_count)
3464 return NULL;
3465
3466 return calloc(1, s + level_count * layer_count * sizeof(*t->sub_resources));
3467}
3468
3470{
3472}
3473
3474static inline unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture,
3475 unsigned int level)
3476{
3477 return max(1, texture->resource.width >> level);
3478}
3479
3480static inline unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture,
3481 unsigned int level)
3482{
3483 return max(1, texture->resource.height >> level);
3484}
3485
3486static inline unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture,
3487 unsigned int level)
3488{
3489 return max(1, texture->resource.depth >> level);
3490}
3491
3493 unsigned int level, struct wined3d_box *box)
3494{
3495 wined3d_box_set(box, 0, 0,
3499}
3500
3502 unsigned int level, const RECT *r)
3503{
3504 unsigned int t;
3505
3507 if ((r->left && r->right) || abs(r->right - r->left) != t)
3508 return false;
3510 if ((r->top && r->bottom) || abs(r->bottom - r->top) != t)
3511 return false;
3512 return true;
3513}
3514
3515HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
3516 const struct wined3d_box *dst_box, struct wined3d_texture *src_texture,
3517 unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, uint32_t flags,
3518 const struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter);
3519
3521void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
3522 struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx);
3524 unsigned int sub_resource_idx, struct wined3d_bo_address *data, uint32_t location);
3526 unsigned int sub_resource_idx, uint32_t location);
3528 struct wined3d_context *context, BOOL srgb);
3530 unsigned int sub_resource_idx, struct wined3d_context *context, uint32_t location);
3531BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx,
3535BOOL wined3d_texture_can_use_pbo(const struct wined3d_texture *texture, const struct wined3d_d3d_info *d3d_info)
3536 ;
3539 HWND window, RECT *rect);
3540void wined3d_texture_update_sub_resource(struct wined3d_texture *texture, unsigned int sub_resource_idx,
3541 struct wined3d_context *context, const struct upload_bo *upload_bo, const struct wined3d_box *box,
3542 unsigned int row_pitch, unsigned int slice_pitch);
3543void wined3d_texture_upload_from_texture(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx,
3544 unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_texture *src_texture,
3545 unsigned int src_sub_resource_idx, const struct wined3d_box *src_box);
3547 unsigned int sub_resource_idx, uint32_t location);
3549 unsigned int sub_resource_idx);
3551
3553 const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count,
3554 uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops);
3555
3557{
3561 void *parent;
3564};
3565
3567{
3568 const struct wined3d_format *format;
3570 unsigned int input_slot;
3571 unsigned int offset;
3572 unsigned int output_slot;
3578};
3579
3581{
3583 void *parent;
3586
3588 unsigned int element_count;
3589
3596};
3597
3599 struct wined3d_light_info *light_info, BOOL enable);
3601 unsigned int idx);
3602
3604{
3608};
3609
3610#define WINED3D_CS_QUERY_POLL_INTERVAL 100u
3611#if defined(_WIN64)
3612#define WINED3D_CS_QUEUE_SIZE 0x1000000u
3613#else
3614#define WINED3D_CS_QUEUE_SIZE 0x400000u
3615#endif
3616#define WINED3D_CS_SPIN_COUNT 2000u
3617/* How long to wait for commands when there are active queries, in µs. */
3618#define WINED3D_CS_COMMAND_WAIT_WITH_QUERIES_TIMEOUT 100
3619/* How long to wait for the CS from the client thread, in µs. */
3620#define WINED3D_CS_CLIENT_WAIT_TIMEOUT 0
3621#define WINED3D_CS_QUEUE_MASK (WINED3D_CS_QUEUE_SIZE - 1)
3622
3624
3626{
3629};
3630
3632{
3633 void *(*require_space)(struct wined3d_device_context *context, size_t size, enum wined3d_cs_queue_id queue_id);
3637 unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc,
3638 const struct wined3d_box *box, uint32_t flags);
3640 unsigned int sub_resource_idx, struct wined3d_box *box, struct upload_bo *upload_bo);
3645};
3646
3648{
3652};
3653
3655{
3657
3663
3666 void *data;
3669
3674};
3675
3677{
3678 if (context == &context->device->cs->c)
3680}
3681
3683{
3684 if (context == &context->device->cs->c)
3686}
3687
3689 const enum wined3d_feature_level *levels, unsigned int level_count);
3690void wined3d_cs_destroy(struct wined3d_cs *cs);
3692 void (*callback)(void *object), void *object);
3694 struct wined3d_texture *texture, unsigned int layer);
3695void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects,
3696 uint32_t flags, const struct wined3d_color *color, float depth, DWORD stencil);
3698 struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, bool fp);
3700void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, const RECT *src_rect,
3701 const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, uint32_t flags);
3703 WORD flags, const struct wined3d_color_key *color_key);
3708 void (*callback)(void *object), void *object);
3710 struct wined3d_bo_address *addr, size_t size, unsigned int flags);
3712 bool enable, float min_depth, float max_depth);
3713
3714static inline void wined3d_cs_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
3715{
3716 cs->c.ops->finish(&cs->c, queue_id);
3717}
3718
3720 struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box,
3721 struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box,
3722 unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter);
3724 struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags,
3725 const struct wined3d_color *color, float depth, unsigned int stencil);
3727 struct wined3d_buffer *dst_buffer, unsigned int offset,
3728 struct wined3d_unordered_access_view *uav);
3730 enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx,
3731 unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count,
3732 bool indexed);
3734 struct wined3d_command_list *list, bool restore_state);
3738 struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc,
3739 const struct wined3d_box *box, unsigned int flags);
3742 struct wined3d_blend_state *state, const struct wined3d_color *blend_factor,
3743 unsigned int sample_mask);
3745 const struct wined3d_vec4 *plane);
3747 enum wined3d_shader_type type, unsigned int start_idx, unsigned int count,
3750 struct wined3d_depth_stencil_state *state, unsigned int stencil_ref);
3756 enum wined3d_format_id format_id, unsigned int offset);
3758 const struct wined3d_light_info *light);
3760 BOOL enable);
3762 struct wined3d_query *predicate, BOOL value);
3764 struct wined3d_rasterizer_state *rasterizer_state);
3766 enum wined3d_render_state state, unsigned int value);
3768 unsigned int count, struct wined3d_rendertarget_view *const *views);
3770 unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers);
3772 unsigned int rect_count, const RECT *rects);
3774 struct wined3d_shader *shader);
3776 enum wined3d_shader_type type, unsigned int start_idx, unsigned int count,
3777 struct wined3d_shader_resource_view *const *views);
3781 unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams);
3783 enum wined3d_shader_type shader_type, unsigned int bind_index,
3786 enum wined3d_texture_stage_state state, unsigned int value);
3790 enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count,
3791 struct wined3d_unordered_access_view *const *views, const unsigned int *initial_count);
3794void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count,
3795 const struct wined3d_viewport *viewports);
3797 struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box,
3798 const void *data, unsigned int row_pitch, unsigned int slice_pitch);
3800 struct wined3d_resource *resource, unsigned int sub_resource_idx);
3802 enum wined3d_push_constants type, uint32_t update_mask, unsigned int start_idx,
3803 unsigned int count, const void *constants);
3804
3806{
3807 const struct wined3d_cs *cs = resource->device->cs;
3808 resource->access_time = cs->queue[WINED3D_CS_QUEUE_DEFAULT].head;
3809}
3810
3811#define WINED3D_PAUSE_SPIN_COUNT 200u
3812
3813static inline void wined3d_pause(unsigned int *spin_count)
3814{
3815 static const LARGE_INTEGER timeout = {.QuadPart = WINED3D_CS_CLIENT_WAIT_TIMEOUT * -10};
3816
3817 if (++*spin_count >= WINED3D_PAUSE_SPIN_COUNT)
3819}
3820
3822{
3823 return (x - y) < UINT_MAX / 2;
3824}
3826
3828{
3829 const struct wined3d_cs *cs = resource->device->cs;
3830 ULONG access_time, tail, head;
3831 unsigned int spin_count = 0;
3832
3833 if (!cs->thread || cs->thread_id == GetCurrentThreadId())
3834 return;
3835
3836 access_time = resource->access_time;
3837 head = cs->queue[WINED3D_CS_QUEUE_DEFAULT].head;
3838
3839 /* The basic idea is that a resource is busy if tail < access_time <= head.
3840 * But we have to be careful about wrap-around of the head and tail. The
3841 * wined3d_ge_wrap function considers x >= y if x - y is smaller than half the
3842 * UINT range. Head is at most WINED3D_CS_QUEUE_SIZE ahead of tail, because
3843 * otherwise the queue memory is considered full and queue_require_space
3844 * stalls. Thus wined3d_ge_wrap(head, tail) is always true. The C_ASSERT above
3845 * ensures this in case we decide to grow the queue size in the future.
3846 *
3847 * It is possible that a resource has not been used for a long time and is idle, but the head and
3848 * tail wrapped around in such a way that the previously set access time falls between head and tail.
3849 * In this case we will incorrectly wait for the resource. Because we use the entire 32 bits of the
3850 * counters and not just the bits needed to address the actual queue memory, this should happen rarely.
3851 * If it turns out to be a problem we can switch to 64 bit counters or attempt to somehow mark the
3852 * access time of resources invalid. CS packets are at least 4 byte aligned, so we could use the lower
3853 * 2 bits in access_time for such a marker.
3854 *
3855 * Note that the access time is set before the command is submitted, so we have to wait until the
3856 * tail is bigger than access_time, not equal. */
3857
3858 if (!wined3d_ge_wrap(head, access_time))
3859 return;
3860
3861 for (;;)
3862 {
3863 tail = *(volatile ULONG *)&cs->queue[WINED3D_CS_QUEUE_DEFAULT].tail;
3864 if (head == tail) /* Queue empty. */
3865 break;
3866
3867 if (!wined3d_ge_wrap(access_time, tail) && access_time != tail)
3868 break;
3869
3870 wined3d_pause(&spin_count);
3871 }
3872}
3873
3875{
3878
3882 void *map_ptr;
3885
3886 /* For buffers which are GPU accessible but for which BUFFER is not
3887 * currently a valid location, this is a list of areas that need to be
3888 * uploaded to BUFFER. */
3891};
3892
3894{
3896}
3897
3899{
3900 if (buffer->bo_user.valid)
3901 return;
3902 buffer->bo_user.valid = true;
3903 list_add_head(&buffer->buffer_object->users, &buffer->bo_user.entry);
3904}
3905
3907 struct wined3d_context *context);
3909void wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset,
3910 struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size);
3912 unsigned int dst_offset, const struct wined3d_const_bo_address *src_addr, unsigned int size);
3914 struct wined3d_bo_address *data);
3917 const struct wined3d_state *state);
3922 struct wined3d_context *context, unsigned int location);
3924 const struct upload_bo *upload_bo, unsigned int offset, unsigned int size);
3926
3928 const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data,
3929 void *parent, const struct wined3d_parent_ops *parent_ops);
3930
3932{
3934
3936 void *parent;
3938
3939 const struct wined3d_format *format;
3940 unsigned int format_attrs;
3941 unsigned int format_caps;
3942 unsigned int sub_resource_idx;
3943 unsigned int layer_count;
3944
3945 unsigned int width;
3946 unsigned int height;
3947
3949};
3950
3953 const struct wined3d_context *context, unsigned int *width, unsigned int *height);
3955 struct wined3d_box *box);
3965 ;
3966
3968 const struct wined3d_view_desc *desc, struct wined3d_resource *resource,
3969 void *parent, const struct wined3d_parent_ops *parent_ops);
3970
3972{
3974
3976 void *parent;
3978
3979 const struct wined3d_format *format;
3980
3982};
3983
3986
3987static inline struct wined3d_texture *wined3d_state_get_ffp_texture(const struct wined3d_state *state, unsigned int idx)
3988{
3989 struct wined3d_shader_resource_view *view = state->shader_resource_view[WINED3D_SHADER_TYPE_PIXEL][idx];
3990
3992 return view ? texture_from_resource(view->resource) : NULL;
3993}
3994
3996{
3998
4000 void *parent;
4002
4003 const struct wined3d_format *format;
4004
4007};
4008
4011 struct wined3d_buffer *buffer, unsigned int offset, struct wined3d_context *context);
4015 unsigned int value);
4016
4018{
4022
4023 struct wined3d_display_mode original_mode, d3d_mode;
4025
4026 /* Window styles to restore when switching fullscreen mode. */
4030};
4031
4035 HWND window, const RECT *window_rect);
4037 HWND window, int x, int y, int width, int height);
4038
4040{
4042 const RECT *src_rect, const RECT *dst_rect, unsigned int swap_interval, uint32_t flags);
4044};
4045
4047{
4049 void *parent;
4053
4061 unsigned int swap_interval;
4062 unsigned int max_frame_latency;
4063
4064 /* Performance tracking */
4067
4070};
4071
4072void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate);
4073void wined3d_swapchain_cleanup(struct wined3d_swapchain *swapchain);
4074struct wined3d_output * wined3d_swapchain_get_output(const struct wined3d_swapchain *swapchain);
4077 const struct wined3d_device *device);
4078
4080 struct wined3d_device *device, const struct wined3d_swapchain_desc *desc,
4081 struct wined3d_swapchain_state_parent *state_parent, void *parent,
4082 const struct wined3d_parent_ops *parent_ops);
4083
4084/*****************************************************************************
4085 * Utility function prototypes
4086 */
4087
4088/* Trace routines */
4089const char *debug_bo_address(const struct wined3d_bo_address *address);
4090const char *debug_box(const struct wined3d_box *box);
4091const char *debug_color(const struct wined3d_color *color);
4096const char *debug_d3dresourcetype(enum wined3d_resource_type resource_type);
4097const char *debug_d3dusage(uint32_t usage);
4100const char *debug_d3dinput_classification(enum wined3d_input_classification classification);
4101const char *debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type);
4104const char *debug_d3dstate(uint32_t state);
4105const char *debug_d3dtexturefiltertype(enum wined3d_texture_filter_type filter_type);
4107const char *debug_d3dtop(enum wined3d_texture_op d3dtop);
4108const char *debug_d3dtstype(enum wined3d_transform_state tstype);
4109const char *debug_ivec4(const struct wined3d_ivec4 *v);
4110const char *debug_uvec4(const struct wined3d_uvec4 *v);
4112const char *debug_vec4(const struct wined3d_vec4 *v);
4114void dump_color_fixup_desc(struct color_fixup_desc fixup);
4115
4116BOOL is_invalid_op(const struct wined3d_state *state, int stage,
4118void state_nop(struct wined3d_context *context,
4119 const struct wined3d_state *state, DWORD state_id);
4121 const struct wined3d_state *state, DWORD state_id);
4122
4124 const struct wined3d_state *state, DWORD state_id);
4125void clipplane(struct wined3d_context *context,
4126 const struct wined3d_state *state, DWORD state_id);
4128 const struct wined3d_state *state, DWORD state_id);
4129
4130/* Math utils */
4131void multiply_matrix(struct wined3d_matrix *dest, const struct wined3d_matrix *src1,
4132 const struct wined3d_matrix *src2);
4133
4135
4137{
4138 struct list entry;
4139 unsigned int idx;
4140 unsigned int value[4];
4141};
4142
4144{
4145 unsigned int sampler;
4146 unsigned int constant_int;
4147 unsigned int constant_float;
4148 unsigned int constant_bool;
4149 unsigned int packed_output;
4150 unsigned int packed_input;
4151};
4152
4153#define wined3d_lock_init(lock, name) wined3d_lock_init_(lock, __FILE__ ": " name)
4154static inline void wined3d_lock_init_(CRITICAL_SECTION *lock, const char *name)
4155{
4157 if (lock->DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
4158 lock->DebugInfo->Spare[0] = (DWORD_PTR)name;
4159}
4160
4162{
4163 if (lock->DebugInfo != (RTL_CRITICAL_SECTION_DEBUG *)-1)
4164 lock->DebugInfo->Spare[0] = 0;
4166}
4167
4168#ifdef __GNUC__
4169#define PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
4170#else
4171#define PRINTF_ATTR(fmt,args)
4172#endif
4173
4175{
4176 struct list list;
4177};
4178
4184
4188
4190{
4191 const DWORD *start;
4192 const DWORD *end;
4193 unsigned int instance_count;
4194 unsigned int temporary_count;
4195};
4196
4198{
4200};
4201
4203{
4204 struct
4205 {
4207 unsigned int fork_count;
4208 unsigned int join_count;
4217};
4218
4220{
4222};
4223
4225{
4228 unsigned int vertices_out;
4229 unsigned int instance_count;
4230
4232};
4233
4235{
4236 /* Pixel shader input semantics */
4238 DWORD input_reg_used; /* MAX_REG_INPUT, 32 */
4239 unsigned int declared_in_count;
4240
4241 /* Some information about the shader behavior */
4243 unsigned int color0_reg;
4244
4248};
4249
4251{
4253};
4254
4256{
4260 unsigned int functionLength;
4262 unsigned int byte_code_size;
4270
4271 void *parent;
4273
4274 /* Programs this shader is linked with */
4276
4277 /* Immediate constants (override global ones) */
4283
4287
4288 /* Pointer to the parent device */
4291
4292 union
4293 {
4300 } u;
4301};
4302
4304 const struct wined3d_ffp_vs_settings *settings, struct wined3d_shader **shader);
4306 const struct ffp_frag_settings *settings, struct wined3d_shader **shader);
4307
4309 unsigned int resource_idx, DWORD tex_types);
4310void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
4311 BOOL position_transformed, struct ps_compile_args *args,
4312 const struct wined3d_context *context);
4313
4314bool vshader_get_input(const struct wined3d_shader *shader,
4315 uint8_t usage_req, uint8_t usage_idx_req, unsigned int *regnum);
4316void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
4317 struct vs_compile_args *args, const struct wined3d_context *context);
4318
4319void find_ds_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
4320 struct ds_compile_args *args, const struct wined3d_context *context);
4321
4322void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader,
4323 struct gs_compile_args *args, const struct wined3d_context *context);
4324
4328unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_maps *reg_maps,
4329 unsigned int max);
4331 const struct wined3d_shader_reg_maps *reg_maps, void *backend_ctx,
4332 const DWORD *start, const DWORD *end);
4333BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage);
4334
4336
4338 struct wined3d_shader_desc *shader_desc, struct wined3d_device *device);
4339bool ffp_hlsl_compile_ps(const struct ffp_frag_settings *settings, struct wined3d_shader_desc *shader_desc);
4340
4342{
4343 switch (reg->type)
4344 {
4345 case WINED3DSPR_RASTOUT:
4346 /* oFog & oPts */
4347 if (reg->idx[0].offset)
4348 return TRUE;
4349 /* oPos */
4350 return FALSE;
4351
4352 case WINED3DSPR_CONSTBOOL: /* b# */
4353 case WINED3DSPR_DEPTHOUT: /* oDepth */
4356 case WINED3DSPR_LOOP: /* aL */
4358 case WINED3DSPR_PREDICATE: /* p0 */
4359 case WINED3DSPR_PRIMID: /* primID */
4360 case WINED3DSPR_COVERAGE: /* vCoverage */
4361 case WINED3DSPR_SAMPLEMASK: /* oMask */
4362 case WINED3DSPR_STENCILREF: /* oStencilRef */
4363 return TRUE;
4364
4366 switch (reg->idx[0].offset)
4367 {
4368 case 0: /* vPos */
4369 return FALSE;
4370 case 1: /* vFace */
4371 return TRUE;
4372 default:
4373 return FALSE;
4374 }
4375
4377 return reg->immconst_type == WINED3D_IMMCONST_SCALAR;
4378
4379 default:
4380 return FALSE;
4381 }
4382}
4383
4384static inline void shader_get_position_fixup(const struct wined3d_context *context,
4385 const struct wined3d_state *state, unsigned int fixup_count, float *position_fixup)
4386{
4387 float center_offset, x = 0.0f, y = 0.0f;
4388 unsigned int i;
4389
4390 /* See get_projection_matrix() in glsl_shader.c for a discussion of the position fixup.
4391 * This function here also applies to d3d10+ which does not need adjustment for
4392 * integer pixel centers, but it may need the filling convention offset. */
4393 if (context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER)
4394 center_offset = 1.0f;
4395 else
4396 center_offset = 0.0f;
4397
4398 center_offset += context->d3d_info->filling_convention_offset;
4399
4400 for (i = 0; i < fixup_count; ++i)
4401 {
4402 position_fixup[4 * i ] = 1.0f;
4403 position_fixup[4 * i + 1] = -1.0f;
4404 if (!context->d3d_info->subpixel_viewport)
4405 {
4406 double dummy;
4407 x = modf(state->viewports[i].x, &dummy) * 2.0f;
4408 y = modf(state->viewports[i].y, &dummy) * 2.0f;
4409 }
4410 position_fixup[4 * i + 2] = (center_offset + x) / state->viewports[i].width;
4411 position_fixup[4 * i + 3] = (center_offset + y) / state->viewports[i].height;
4412 }
4413}
4414
4416{
4417 struct wined3d_shader_lconst *lconst;
4418
4419 if (shader->load_local_constsF)
4420 return FALSE;
4421
4422 LIST_FOR_EACH_ENTRY(lconst, &shader->constantsF, struct wined3d_shader_lconst, entry)
4423 {
4424 if (lconst->idx == reg)
4425 return TRUE;
4426 }
4427
4428 return FALSE;
4429}
4430
4432 const struct ps_compile_args *ps_args, unsigned int resource_idx, unsigned int sampler_idx)
4433{
4434 const struct wined3d_shader_version *version = &shader->reg_maps.shader_version;
4435
4436 if (version->major >= 4)
4437 return shader->reg_maps.sampler_comparison_mode & (1u << sampler_idx);
4438 else
4439 return version->type == WINED3D_SHADER_TYPE_PIXEL && (ps_args->shadow & (1u << resource_idx));
4440}
4441
4443void get_modelview_matrix(const struct wined3d_stateblock_state *state, unsigned int index, struct wined3d_matrix *mat);
4445 const unsigned int tex, struct wined3d_matrix *mat);
4446void get_pointsize_minmax(const struct wined3d_context *context, const struct wined3d_state *state,
4447 float *out_min, float *out_max);
4448void get_fog_start_end(const struct wined3d_context *context, const struct wined3d_state *state,
4449 float *start, float *end);
4450
4452{
4455
4456 unsigned int size;
4459};
4460
4461/* DirectDraw utility functions */
4463
4464/*****************************************************************************
4465 * Pixel format management
4466 */
4467
4468/* Pixel format attributes */
4469#define WINED3D_FORMAT_ATTR_FLOAT 0x00000001
4470#define WINED3D_FORMAT_ATTR_INTEGER 0x00000002
4471#define WINED3D_FORMAT_ATTR_NORMALISED 0x00000004
4472#define WINED3D_FORMAT_ATTR_BUMPMAP 0x00000008
4473#define WINED3D_FORMAT_ATTR_EXTENSION 0x00000010
4474#define WINED3D_FORMAT_ATTR_BLOCKS 0x00000020
4475#define WINED3D_FORMAT_ATTR_BLOCKS_NO_VERIFY 0x00000040
4476#define WINED3D_FORMAT_ATTR_COMPRESSED 0x00000080
4477#define WINED3D_FORMAT_ATTR_BROKEN_PITCH 0x00000100
4478#define WINED3D_FORMAT_ATTR_HEIGHT_SCALE 0x00000200
4479#define WINED3D_FORMAT_ATTR_MAPPABLE 0x00000400
4480#define WINED3D_FORMAT_ATTR_CAST_TO_BLOCK 0x00000800
4481
4482/* Pixel format capabilities */
4483#define WINED3D_FORMAT_CAP_POSTPIXELSHADER_BLENDING 0x00000001
4484#define WINED3D_FORMAT_CAP_FILTERING 0x00000002
4485#define WINED3D_FORMAT_CAP_UNORDERED_ACCESS 0x00000004
4486#define WINED3D_FORMAT_CAP_DEPTH_STENCIL 0x00000008
4487#define WINED3D_FORMAT_CAP_RENDERTARGET 0x00000010
4488#define WINED3D_FORMAT_CAP_FBO_ATTACHABLE 0x00000020
4489#define WINED3D_FORMAT_CAP_FBO_ATTACHABLE_SRGB 0x00000040
4490#define WINED3D_FORMAT_CAP_DECOMPRESS 0x00000080
4491#define WINED3D_FORMAT_CAP_SRGB_READ 0x00000100
4492#define WINED3D_FORMAT_CAP_SRGB_WRITE 0x00000200
4493#define WINED3D_FORMAT_CAP_VTF 0x00000400
4494#define WINED3D_FORMAT_CAP_SHADOW 0x00000800
4495#define WINED3D_FORMAT_CAP_TEXTURE 0x00001000
4496#define WINED3D_FORMAT_CAP_GEN_MIPMAP 0x00002000
4497#define WINED3D_FORMAT_CAP_VERTEX_ATTRIBUTE 0x00004000
4498#define WINED3D_FORMAT_CAP_BLIT 0x00008000
4499#define WINED3D_FORMAT_CAP_INDEX_BUFFER 0x00010000
4500
4502{
4505};
4506
4508{
4510 void (*convert)(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch,
4511 unsigned int width, unsigned int height, const struct wined3d_color_key *colour_key);
4512};
4513
4515{
4525};
4526
4528{
4530
4532 unsigned int component_count;
4544
4548
4550
4553 unsigned int attrs;
4558 void (*upload)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch,
4559 unsigned int dst_row_pitch, unsigned dst_slice_pitch,
4560 unsigned int width, unsigned int height, unsigned int depth);
4561 void (*download)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch,
4562 unsigned int dst_row_pitch, unsigned dst_slice_pitch,
4563 unsigned int width, unsigned int height, unsigned int depth);
4564 void (*decompress)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch,
4565 unsigned int dst_row_pitch, unsigned dst_slice_pitch,
4566 unsigned int width, unsigned int height, unsigned int depth);
4567
4569};
4570
4571const struct wined3d_format *wined3d_get_format(const struct wined3d_adapter *adapter,
4572 enum wined3d_format_id format_id, unsigned int bind_flags);
4574 const struct wined3d_format *format, enum wined3d_channel_type channel_type);
4575void wined3d_format_calculate_pitch(const struct wined3d_format *format, unsigned int alignment,
4576 unsigned int width, unsigned int height, unsigned int *row_pitch, unsigned int *slice_pitch);
4580 const struct wined3d_color *color, void *ret);
4581void wined3d_format_copy_data(const struct wined3d_format *format, const uint8_t *src,
4582 unsigned int src_row_pitch, unsigned int src_slice_pitch, uint8_t *dst, unsigned int dst_row_pitch,
4583 unsigned int dst_slice_pitch, unsigned int w, unsigned int h, unsigned int d);
4585 const struct wined3d_color_key *key, struct wined3d_color *float_colors);
4587 enum wined3d_format_id view_format_id);
4589 const struct wined3d_texture *texture, BOOL need_alpha_ck);
4592 enum wined3d_format_id format2);
4593
4595 struct wined3d_texture *texture);
4596
4597BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size);
4598
4600{
4601 return format->id == format->typeless_id && format->id != WINED3DFMT_UNKNOWN;
4602}
4603
4604static inline BOOL use_vs(const struct wined3d_state *state)
4605{
4606 /* Check state->vertex_declaration to allow this to be used before the
4607 * stream info is validated, for example in device_update_tex_unit_map(). */
4608 return state->shader[WINED3D_SHADER_TYPE_VERTEX]
4609 && (!state->vertex_declaration || !state->vertex_declaration->position_transformed);
4610}
4611
4612static inline BOOL use_ps(const struct wined3d_state *state)
4613{
4614 return !!state->shader[WINED3D_SHADER_TYPE_PIXEL];
4615}
4616
4618{
4619 const struct wined3d_shader *shader;
4620
4621 if (!(shader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]))
4622 return FALSE;
4623 return !!shader->u.gs.so_desc;
4624}
4625
4627 const struct wined3d_state *state, DWORD state_id)
4628{
4629 const struct wined3d_state_entry *state_table = context->state_table;
4630 unsigned int rep = state_table[state_id].representative;
4631 state_table[rep].apply(context, state, rep);
4632}
4633
4635 const struct wined3d_texture *texture)
4636{
4637 if (!(context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL))
4638 return FALSE;
4639
4640 if (!context->d3d_info->srgb_read_control
4641 && (texture->resource.bind_flags & WINED3D_BIND_SHADER_RESOURCE)
4642 && (texture->resource.format_caps & WINED3D_FORMAT_CAP_SRGB_READ))
4643 return TRUE;
4644
4645 if (!context->d3d_info->srgb_write_control
4646 && (texture->resource.bind_flags & WINED3D_BIND_RENDER_TARGET)
4647 && (texture->resource.format_caps & WINED3D_FORMAT_CAP_SRGB_WRITE))
4648 return TRUE;
4649
4650 return FALSE;
4651}
4652
4653static inline BOOL needs_srgb_write(const struct wined3d_d3d_info *d3d_info,
4654 const struct wined3d_state *state, const struct wined3d_fb_state *fb)
4655{
4657 || state->render_states[WINED3D_RS_SRGBWRITEENABLE])
4658 && fb->render_targets[0] && fb->render_targets[0]->format_caps & WINED3D_FORMAT_CAP_SRGB_WRITE;
4659}
4660
4661static inline BOOL can_use_texture_swizzle(const struct wined3d_d3d_info *d3d_info, const struct wined3d_format *format)
4662{
4663 return d3d_info->texture_swizzle && !is_complex_fixup(format->color_fixup) && !is_scaling_fixup(format->color_fixup);
4664}
4665
4666static inline BOOL is_rasterization_disabled(const struct wined3d_shader *geometry_shader)
4667{
4668 return geometry_shader && geometry_shader->u.gs.so_desc
4669 && geometry_shader->u.gs.so_desc->rasterizer_stream_idx == WINED3D_NO_RASTERIZER_STREAM;
4670}
4671
4672static inline uint32_t wined3d_mask_from_size(unsigned int size)
4673{
4674 return size < 32 ? (1u << size) - 1 : ~0u;
4675}
4676
4677static inline DWORD wined3d_extract_bits(const uint32_t *bitstream,
4678 unsigned int offset, unsigned int count)
4679{
4680 const unsigned int word_bit_count = sizeof(*bitstream) * CHAR_BIT;
4681 const unsigned int idx = offset / word_bit_count;
4682 const unsigned int shift = offset % word_bit_count;
4683 DWORD mask = (1u << count) - 1;
4684 DWORD ret;
4685
4686 ret = (bitstream[idx] >> shift) & mask;
4687 if (shift + count > word_bit_count)
4688 {
4689 const unsigned int extracted_bit_count = word_bit_count - shift;
4690 const unsigned int remaining_bit_count = count - extracted_bit_count;
4691 mask = (1u << remaining_bit_count) - 1;
4692 ret |= (bitstream[idx + 1] & mask) << extracted_bit_count;
4693 }
4694 return ret;
4695}
4696
4697static inline void wined3d_insert_bits(uint32_t *bitstream,
4698 unsigned int offset, unsigned int count, DWORD bits)
4699{
4700 const unsigned int word_bit_count = sizeof(*bitstream) * CHAR_BIT;
4701 const unsigned int idx = offset / word_bit_count;
4702 const unsigned int shift = offset % word_bit_count;
4703 DWORD mask = (1u << count) - 1;
4704
4705 bitstream[idx] |= (bits & mask) << shift;
4706 if (shift + count > word_bit_count)
4707 {
4708 const unsigned int inserted_bit_count = word_bit_count - shift;
4709 const unsigned int remaining_bit_count = count - inserted_bit_count;
4710 mask = (1u << remaining_bit_count) - 1;
4711 bitstream[idx + 1] |= (bits >> inserted_bit_count) & mask;
4712 }
4713}
4714
4715static inline void wined3d_from_cs(const struct wined3d_cs *cs)
4716{
4717 if (cs->thread)
4718 assert(cs->thread_id == GetCurrentThreadId());
4719}
4720
4721static inline void wined3d_not_from_cs(const struct wined3d_cs *cs)
4722{
4723 assert(cs->thread_id != GetCurrentThreadId());
4724}
4725
4728{
4729 if (source == WINED3D_MCS_COLOR1 && vdecl->diffuse)
4730 return source;
4731 if (source == WINED3D_MCS_COLOR2 && vdecl->specular)
4732 return source;
4733 return WINED3D_MCS_MATERIAL;
4734}
4735
4739{
4740 const struct wined3d_vertex_declaration *vdecl = state->vertex_declaration;
4741
4742 if (!state->render_states[WINED3D_RS_LIGHTING])
4743 {
4746 *emissive = *ambient = WINED3D_MCS_MATERIAL;
4747
4748 return;
4749 }
4750
4751 if (!state->render_states[WINED3D_RS_COLORVERTEX])
4752 {
4753 *diffuse = *emissive = *ambient = *specular = WINED3D_MCS_MATERIAL;
4754
4755 return;
4756 }
4757
4762}
4763
4764static inline void wined3d_vec4_transform(struct wined3d_vec4 *dst,
4765 const struct wined3d_vec4 *v, const struct wined3d_matrix *m)
4766{
4767 struct wined3d_vec4 tmp;
4768
4769 tmp.x = v->x * m->_11 + v->y * m->_21 + v->z * m->_31 + v->w * m->_41;
4770 tmp.y = v->x * m->_12 + v->y * m->_22 + v->z * m->_32 + v->w * m->_42;
4771 tmp.z = v->x * m->_13 + v->y * m->_23 + v->z * m->_33 + v->w * m->_43;
4772 tmp.w = v->x * m->_14 + v->y * m->_24 + v->z * m->_34 + v->w * m->_44;
4773
4774 *dst = tmp;
4775}
4776
4777BOOL invert_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m);
4778
4779void compute_normal_matrix(struct wined3d_matrix *normal_matrix, BOOL legacy_lighting,
4780 const struct wined3d_matrix *modelview);
4781
4783 struct wined3d_texture *texture, unsigned int sub_resource_idx)
4784{
4786
4787 return device->adapter->adapter_ops->adapter_acquire_context(device, texture, sub_resource_idx);
4788}
4789
4790static inline void context_release(struct wined3d_context *context)
4791{
4792 context->device->adapter->adapter_ops->adapter_release_context(context);
4793}
4794
4795static inline float wined3d_get_float_state(const struct wined3d_state *state, enum wined3d_render_state rs)
4796{
4797 union
4798 {
4799 DWORD d;
4800 float f;
4801 }
4802 tmpvalue;
4803
4804 tmpvalue.d = state->render_states[rs];
4805 return tmpvalue.f;
4806}
4807
4809 const struct wined3d_bo_address *data, size_t size, uint32_t map_flags)
4810{
4811 return context->device->adapter->adapter_ops->adapter_map_bo_address(context, data, size, map_flags);
4812}
4813
4815 const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges)
4816{
4817 context->device->adapter->adapter_ops->adapter_unmap_bo_address(context, data, range_count, ranges);
4818}
4819
4821 const struct wined3d_bo_address *dst, const struct wined3d_bo_address *src,
4822 unsigned int range_count, const struct wined3d_range *ranges, uint32_t map_flags)
4823{
4824 context->device->adapter->adapter_ops->adapter_copy_bo_address(context, dst, src, range_count, ranges, map_flags);
4825}
4826
4828 const struct wined3d_const_bo_address *data, size_t size)
4829{
4830 context->device->adapter->adapter_ops->adapter_flush_bo_address(context, data, size);
4831}
4832
4833static inline void wined3d_context_destroy_bo(struct wined3d_context *context, struct wined3d_bo *bo)
4834{
4835 context->device->adapter->adapter_ops->adapter_destroy_bo(context, bo);
4836}
4837
4839 const struct wined3d_format *srv_format)
4840{
4841 return !srv_format || (srv_format->red_size && !(dsv->desc.flags & WINED3D_VIEW_READ_ONLY_DEPTH))
4842 || (srv_format->green_size && !(dsv->desc.flags & WINED3D_VIEW_READ_ONLY_STENCIL));
4843}
4844
4845static inline unsigned int wined3d_bind_layer_count(const struct wined3d_texture *texture)
4846{
4847 return texture->resource.type == WINED3D_RTYPE_TEXTURE_3D ? texture->resource.depth : texture->layer_count;
4848}
4849
4851{
4852 struct wined3d_texture *texture;
4853
4854 if (srv->resource->type == WINED3D_RTYPE_BUFFER)
4855 return TRUE;
4856
4857 if (srv->desc.u.texture.layer_idx || srv->desc.u.texture.level_idx)
4858 return FALSE;
4859
4861 return srv->desc.u.texture.level_count == texture->level_count
4862 && srv->desc.u.texture.layer_count == wined3d_bind_layer_count(texture);
4863}
4864
4865static inline bool wined3d_rtv_all_subresources(const struct wined3d_rendertarget_view *rtv)
4866{
4867 struct wined3d_texture *texture;
4868
4869 if (rtv->resource->type == WINED3D_RTYPE_BUFFER)
4870 return TRUE;
4871
4872 if (rtv->sub_resource_idx)
4873 return FALSE;
4874
4876 return texture->level_count == 1 && rtv->layer_count == wined3d_bind_layer_count(texture);
4877}
4878
4880{
4881 InterlockedIncrement(&srv->resource->srv_bind_count_device);
4882}
4883
4885{
4886 InterlockedDecrement(&srv->resource->srv_bind_count_device);
4887}
4888
4890{
4891 InterlockedIncrement(&rtv->resource->rtv_bind_count_device);
4892}
4893
4895{
4896 InterlockedDecrement(&rtv->resource->rtv_bind_count_device);
4897}
4898
4899static inline bool wined3d_rtv_overlaps_srv(const struct wined3d_rendertarget_view *rtv,
4900 const struct wined3d_shader_resource_view *srv)
4901{
4902 if (rtv->resource != srv->resource)
4903 return false;
4904
4906 return true;
4907
4908 return rtv->sub_resource_idx >= srv->desc.u.texture.level_idx
4909 && rtv->sub_resource_idx < srv->desc.u.texture.level_idx + srv->desc.u.texture.level_count
4910 && rtv->layer_count >= srv->desc.u.texture.layer_idx;
4911}
4912
4913static inline bool wined3d_is_srv_rtv_bound(const struct wined3d_state *state,
4914 const struct wined3d_shader_resource_view *srv)
4915{
4916 unsigned int i;
4917
4918 if (!srv->resource->rtv_bind_count_device)
4919 return false;
4920
4921 for (i = 0; i < ARRAY_SIZE(state->fb.render_targets); ++i)
4922 {
4923 const struct wined3d_rendertarget_view *rtv;
4924
4925 if ((rtv = state->fb.render_targets[i]) && wined3d_rtv_overlaps_srv(rtv, srv))
4926 return true;
4927 }
4928
4929 return false;
4930}
4931
4932static inline void wined3d_viewport_get_z_range(const struct wined3d_viewport *vp, float *min_z, float *max_z)
4933{
4934 *min_z = vp->min_z;
4935
4936 /* The magic constant is derived from tests. */
4937 *max_z = max(vp->max_z, vp->min_z + 0.001f);
4938}
4939
4940static inline BOOL wined3d_bitmap_clear(uint32_t *map, unsigned int idx)
4941{
4942 return map[idx >> 5] &= ~(1u << (idx & 0x1f));
4943}
4944
4945static inline BOOL wined3d_bitmap_set(uint32_t *map, unsigned int idx)
4946{
4947 return map[idx >> 5] |= (1u << (idx & 0x1f));
4948}
4949
4950static inline BOOL wined3d_bitmap_is_set(const uint32_t *map, unsigned int idx)
4951{
4952 return map[idx >> 5] & (1u << (idx & 0x1f));
4953}
4954
4955static inline unsigned int wined3d_bitmap_ffs_xor(const uint32_t *bitmap, unsigned int bit_count,
4956 unsigned int start, uint32_t xor_mask)
4957{
4958 const unsigned int word_bit_count = sizeof(*bitmap) * CHAR_BIT;
4959 const uint32_t *ptr, *end_ptr;
4960 uint32_t map, mask;
4961
4962 assert(bit_count < word_bit_count || !(bit_count % word_bit_count));
4963
4964 ptr = bitmap + start / word_bit_count;
4965 end_ptr = bitmap + (bit_count + word_bit_count - 1) / word_bit_count;
4966
4967 if (ptr >= end_ptr)
4968 return ~0u;
4969
4970 mask = ~0u << start % word_bit_count;
4971 map = (*ptr ^ xor_mask) & mask;
4972 while (!map)
4973 {
4974 if (++ptr == end_ptr)
4975 return ~0u;
4976 map = *ptr ^ xor_mask;
4977 }
4978 return (ptr - bitmap) * word_bit_count + wined3d_bit_scan(&map);
4979}
4980
4981static inline unsigned int wined3d_bitmap_ffs(const uint32_t *bitmap, unsigned int bit_count, unsigned int start)
4982{
4983 return wined3d_bitmap_ffs_xor(bitmap, bit_count, start, 0);
4984}
4985
4986static inline unsigned int wined3d_bitmap_ffz(const uint32_t *bitmap, unsigned int bit_count, unsigned int start)
4987{
4988 return wined3d_bitmap_ffs_xor(bitmap, bit_count, start, ~0u);
4989}
4990
4991static inline BOOL wined3d_bitmap_get_range(const uint32_t *bitmap, unsigned int bit_count,
4992 unsigned int start, struct wined3d_range *range)
4993{
4994 unsigned int range_start, range_end;
4995
4996 range_start = wined3d_bitmap_ffs(bitmap, bit_count, start);
4997 if (range_start == ~0u)
4998 return FALSE;
4999
5000 range_end = wined3d_bitmap_ffz(bitmap, bit_count, range_start + 1);
5001 if (range_end == ~0u)
5002 range_end = bit_count;
5003
5004 range->offset = range_start;
5005 range->size = range_end - range_start;
5006 return TRUE;
5007}
5008
5009static inline bool wined3d_context_is_graphics_state_dirty(const struct wined3d_context *context, unsigned int state_id)
5010{
5011 return wined3d_bitmap_is_set(context->dirty_graphics_states, state_id);
5012}
5013
5014static inline bool wined3d_context_is_compute_state_dirty(const struct wined3d_context *context, unsigned int state_id)
5015{
5016 return wined3d_bitmap_is_set(context->dirty_compute_states, state_id - STATE_COMPUTE_OFFSET);
5017}
5018
5019static inline bool isStateDirty(const struct wined3d_context *context, unsigned int state_id)
5020{
5022}
5023
5025{
5026 return t == WINED3D_PT_POINTLIST
5031 || t == WINED3D_PT_PATCH;
5032}
5033
5034static inline bool wined3d_map_persistent(void)
5035{
5036 return sizeof(void *) >= sizeof(uint64_t);
5037}
5038
5039/* The WNDCLASS-Name for the fake window which we use to retrieve the GL capabilities */
5040#define WINED3D_OPENGL_WINDOW_CLASS_NAME "WineD3D_OpenGL"
5041
5043
5044#endif
struct mke2fs_defaults settings[]
@ lparam
Definition: SystemMenu.c:31
@ wparam
Definition: SystemMenu.c:30
COMPILER_DEPENDENT_INT64 INT64
Definition: actypes.h:132
COMPILER_DEPENDENT_UINT64 UINT64
Definition: actypes.h:131
struct outqueuenode * tail
Definition: adnsresfilter.c:66
struct outqueuenode * head
Definition: adnsresfilter.c:66
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
Definition: align.cpp:48
static int state
Definition: maze.c:121
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define index(s, c)
Definition: various.h:29
#define ARRAY_SIZE(A)
Definition: main.h:20
static void list_add_head(struct list_entry *head, struct list_entry *entry)
Definition: list.h:76
Definition: list.h:39
Definition: _map.h:48
RECT rect
Definition: combotst.c:67
HDC dc
Definition: cylfrac.c:34
range
Definition: d3dx9_private.h:58
const WCHAR * vendor
Definition: db.cpp:873
#define CCHDEVICENAME
Definition: ddrawi.h:63
device_type
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
UINT32 uint32_t
Definition: types.h:75
UINT64 uint64_t
Definition: types.h:77
UINT op
Definition: effect.c:235
static const struct @282 state_table[]
unsigned int idx
Definition: utils.c:40
content
Definition: atl_ax.c:990
#define CHAR_BIT
Definition: cabinet.h:45
static const WCHAR version[]
Definition: asmname.c:66
BOOL WINAPI InitializeCriticalSectionEx(OUT LPCRITICAL_SECTION lpCriticalSection, IN DWORD dwSpinCount, IN DWORD flags)
Definition: sync.c:107
#define assert(_expr)
Definition: assert.h:32
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
Definition: string.c:2807
#define UINT_MAX
Definition: limits.h:27
_ACRTIMP float __cdecl powf(float, float)
Definition: powf.c:14
#define isinf(x)
Definition: math.h:359
#define isnan(x)
Definition: math.h:360
#define NAN
Definition: math.h:273
#define INFINITY
Definition: math.h:272
_ACRTIMP double __cdecl modf(double, double *)
Definition: modf.c:30
_ACRTIMP float __cdecl fabsf(float)
unsigned char uint8_t
Definition: stdint.h:33
char * va_list
Definition: vadefs.h:50
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
method
Definition: dragdrop.c:54
ULONG RGBQUAD
Definition: precomp.h:47
return ret
Definition: mutex.c:147
r parent
Definition: btrfs.c:3010
#define abs(i)
Definition: fconv.c:206
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
return adapter
GLuint start
Definition: gl.h:1545
GLint GLint GLsizei GLsizei GLsizei depth
Definition: gl.h:1546
GLint level
Definition: gl.h:1546
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
const GLdouble * v
Definition: gl.h:2040
GLuint GLuint GLsizei count
Definition: gl.h:1545
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
GLdouble s
Definition: gl.h:2039
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
GLuint GLuint end
Definition: gl.h:1545
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLdouble GLdouble GLdouble r
Definition: gl.h:2055
GLdouble GLdouble t
Definition: gl.h:2047
GLint GLint GLsizei width
Definition: gl.h:1546
GLdouble GLdouble GLdouble GLdouble q
Definition: gl.h:2063
GLenum func
Definition: glext.h:6028
GLenum GLuint texture
Definition: glext.h:6295
GLuint address
Definition: glext.h:9393
GLuint * samplers
Definition: glext.h:7280
GLenum src
Definition: glext.h:6340
GLuint buffer
Definition: glext.h:5915
GLsizeiptr size
Definition: glext.h:5919
GLintptr offset
Definition: glext.h:5920
GLuint color
Definition: glext.h:6243
GLuint GLuint GLuint GLuint arg1
Definition: glext.h:9513
const GLubyte * c
Definition: glext.h:8905
GLuint sampler
Definition: glext.h:7283
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
Definition: glext.h:9515
GLuint shader
Definition: glext.h:6030
GLuint index
Definition: glext.h:6031
GLenum GLint GLuint mask
Definition: glext.h:6028
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
Definition: glext.h:9514
GLfloat f
Definition: glext.h:7540
const GLuint * shaders
Definition: glext.h:7538
GLuint GLenum matrix
Definition: glext.h:9407
GLuint in
Definition: glext.h:9616
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
Definition: glext.h:10929
GLenum GLenum dst
Definition: glext.h:6340
GLbitfield flags
Definition: glext.h:7161
GLenum const GLvoid * addr
Definition: glext.h:9621
GLsizei levels
Definition: glext.h:7884
GLuint GLint GLboolean GLint GLenum access
Definition: glext.h:7866
GLfloat GLfloat p
Definition: glext.h:8902
GLboolean enable
Definition: glext.h:11120
GLenum GLuint GLint GLint layer
Definition: glext.h:7007
const GLuint * buffers
Definition: glext.h:5916
GLubyte GLubyte GLubyte GLubyte w
Definition: glext.h:6102
GLsizeiptr const GLvoid GLenum usage
Definition: glext.h:5919
GLint GLfloat GLint stencil
Definition: glext.h:6260
const GLfloat * m
Definition: glext.h:10848
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint GLenum GLenum GLenum GLint GLuint GLenum GLenum GLfloat GLenum GLfloat GLenum GLint const GLfloat GLenum GLint const GLushort GLint GLint GLsizei GLsizei GLenum GLsizei GLsizei GLenum GLenum const GLvoid GLenum plane
Definition: glfuncs.h:270
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum light
Definition: glfuncs.h:170
unsigned int UINT
Definition: sysinfo.c:13
static int reg
Definition: i386-dis.c:1290
#define cs
Definition: i386-dis.c:442
#define InterlockedCompareExchange
Definition: interlocked.h:119
uint32_t entry
Definition: isohybrid.c:63
#define d
Definition: ke_i.h:81
#define e
Definition: ke_i.h:82
#define f
Definition: ke_i.h:83
#define resource
Definition: kernel32.h:9
#define location(file, line)
Definition: kmtest.h:18
if(dx< 0)
Definition: linetemp.h:194
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
#define memchr(s, c, n)
Definition: mkisofs.h:875
static PVOID ptr
Definition: dispmode.c:27
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static IPrintDialogCallback callback
Definition: printdlg.c:325
D3D11_SHADER_VARIABLE_DESC desc
Definition: reflection.c:1683
float specular[3]
Definition: d3drm.c:3534
float emissive[3]
Definition: d3drm.c:3535
static const char * dst_format
Definition: dib.c:1339
static const BYTE ramp[17]
Definition: dib.c:2957
static const MAT2 mat
Definition: font.c:51
constants
Definition: resource.c:30
static SYSTEM_INFO si
Definition: virtual.c:39
static IHTMLWindow2 * window
Definition: events.c:77
static char * dest
Definition: rtl.c:149
static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos)
static float(__cdecl *square_half_float)(float x
static UINT format_id
Definition: clipboard.c:1455
#define shift
Definition: input.c:3280
DWORD exp
Definition: msg.c:18625
static BYTE parameters[]
Definition: asn.c:558
int other
Definition: msacm.c:1376
direction
Definition: netio.c:882
LPCWSTR app_name
Definition: notevil.c:34
#define uint64_t
Definition: nsiface.idl:62
#define bool
Definition: nsiface.idl:72
NTSTATUS NTAPI NtDelayExecution(IN BOOLEAN Alertable, IN PLARGE_INTEGER DelayInterval)
Definition: wait.c:889
#define BOOL
Definition: nt_native.h:43
#define DWORD
Definition: nt_native.h:44
static HANDLE proc()
Definition: pdb.c:32
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
Definition: winuser.h:3014
static unsigned __int64 next
Definition: rand_nt.c:6
int ssize_t
Definition: rosdhcp.h:52
#define calloc
Definition: rosglue.h:14
#define list
Definition: rosglue.h:35
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
Definition: list.h:236
#define wine_rb_entry
Definition: rbtree.h:404
#define wine_rb_tree
Definition: rbtree.h:405
#define f2(x, y, z)
Definition: sha1.c:31
#define f1(x, y, z)
Definition: sha1.c:30
#define memset(x, y, z)
Definition: compat.h:39
Definition: dcommon.idl:28
Definition: match.c:390
Definition: uimain.c:89
Definition: palette.c:466
unsigned short x_source
unsigned short y_sign_fixup
unsigned short w_source
unsigned short x_sign_fixup
unsigned short z_sign_fixup
unsigned short y_source
unsigned short w_sign_fixup
unsigned short z_source
Definition: http.c:7252
Definition: devices.h:37
uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]
unsigned int padding
enum wined3d_tessellator_output_primitive tessellator_output_primitive
unsigned int output_count
enum wined3d_tessellator_partitioning tessellator_partitioning
unsigned int next_shader_type
struct wine_rb_entry entry
struct ffp_frag_settings settings
unsigned char alpha_test_func
unsigned char padding
unsigned char color_key_enabled
struct texture_stage_op op[WINED3D_MAX_FFP_TEXTURES]
unsigned char texcoords_initialized
unsigned char flatshading
unsigned char pointsprite
unsigned char sRGB_write
Definition: filter.c:165
Definition: dsound.c:943
unsigned int max_blend_stages
unsigned int PrimitiveMiscCaps
unsigned int max_textures
unsigned int TextureOpCaps
enum wined3d_primitive_type primitive_type
unsigned int output_count
uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]
Definition: copy.c:22
Definition: tftpd.h:60
Definition: name.c:39
enum wined3d_ffp_ps_fog_mode fog
struct color_fixup_desc color_fixup[WINED3D_MAX_FRAGMENT_SAMPLERS]
enum wined3d_vertex_processing_mode vp_mode
Definition: queue.c:179
Definition: rbtree.h:30
Definition: rbtree.h:40
unsigned int vs_version
unsigned int varying_count
unsigned int cs_version
unsigned int ps_uniform_count
unsigned int hs_version
unsigned int gs_version
unsigned int vs_uniform_count
unsigned int ps_version
unsigned int ds_version
struct color_fixup_desc color_fixup
Definition: dhcpd.h:248
uint32_t flags
Definition: mesh.c:4665
uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]
unsigned int next_shader_input_count
void(* adapter_destroy_bo)(struct wined3d_context *context, struct wined3d_bo *bo)
void(* adapter_destroy_unordered_access_view)(struct wined3d_unordered_access_view *view)
HRESULT(* adapter_create_texture)(struct wined3d_device *device, const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
HRESULT(* adapter_create_query)(struct wined3d_device *device, enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query)
HRESULT(* adapter_create_device)(struct wined3d *wined3d, const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags, BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count, struct wined3d_device_parent *device_parent, struct wined3d_device **device)
BOOL(* adapter_check_format)(const struct wined3d_adapter *adapter, const struct wined3d_format *adapter_format, const struct wined3d_format *rt_format, const struct wined3d_format *ds_format)
HRESULT(* adapter_create_sampler)(struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler)
void(* adapter_destroy_device)(struct wined3d_device *device)
void(* adapter_draw_primitive)(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_draw_parameters *parameters)
void(* adapter_destroy)(struct wined3d_adapter *adapter)
void(* adapter_unmap_bo_address)(struct wined3d_context *context, const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges)
void(* adapter_dispatch_compute)(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *parameters)
HRESULT(* adapter_create_buffer)(struct wined3d_device *device, const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_buffer **buffer)
void(* adapter_copy_bo_address)(struct wined3d_context *context, const struct wined3d_bo_address *dst, const struct wined3d_bo_address *src, unsigned int range_count, const struct wined3d_range *ranges, uint32_t map_flags)
HRESULT(* adapter_init_3d)(struct wined3d_device *device)
void(* adapter_destroy_query)(struct wined3d_query *query)
void(* adapter_uninit_3d)(struct wined3d_device *device)
void(* adapter_destroy_swapchain)(struct wined3d_swapchain *swapchain)
void(* adapter_clear_uav)(struct wined3d_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, bool fp)
void(* adapter_destroy_shader_resource_view)(struct wined3d_shader_resource_view *view)
void(* adapter_flush_context)(struct wined3d_context *context)
HRESULT(* adapter_create_rendertarget_view)(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rendertarget_view **view)
void(* adapter_generate_mipmap)(struct wined3d_context *context, struct wined3d_shader_resource_view *view)
HRESULT(* adapter_create_unordered_access_view)(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_unordered_access_view **view)
void(* adapter_release_context)(struct wined3d_context *context)
void(* adapter_destroy_texture)(struct wined3d_texture *texture)
HRESULT(* adapter_create_swapchain)(struct wined3d_device *device, const struct wined3d_swapchain_desc *desc, struct wined3d_swapchain_state_parent *state_parent, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_swapchain **swapchain)
void(* adapter_flush_bo_address)(struct wined3d_context *context, const struct wined3d_const_bo_address *data, size_t size)
void(* adapter_get_wined3d_caps)(const struct wined3d_adapter *adapter, struct wined3d_caps *caps)
void(* adapter_destroy_buffer)(struct wined3d_buffer *buffer)
void(* adapter_destroy_rendertarget_view)(struct wined3d_rendertarget_view *view)
HRESULT(* adapter_create_shader_resource_view)(const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_shader_resource_view **view)
bool(* adapter_alloc_bo)(struct wined3d_device *device, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_bo_address *addr)
void(* adapter_destroy_sampler)(struct wined3d_sampler *sampler)
struct wined3d_driver_info driver_info
const struct wined3d_shader_backend_ops * shader_backend
struct wined3d_d3d_info d3d_info
const struct wined3d_state_entry_template * misc_state_template
struct wined3d_output * outputs
unsigned int ordinal
const struct wined3d_fragment_pipe_ops * fragment_pipe
const struct wined3d_vertex_pipe_ops * vertex_pipe
D3DKMT_HANDLE kmt_adapter
const struct wined3d_adapter_ops * adapter_ops
struct wined3d_allocator_block * sibling
struct wined3d_allocator_chunk * chunk
struct wined3d_allocator_block * parent
struct list available[WINED3D_ALLOCATOR_CHUNK_ORDER_COUNT]
struct wined3d_allocator * allocator
void(* allocator_destroy_chunk)(struct wined3d_allocator_chunk *chunk)
struct wined3d_allocator_block * free
struct wined3d_allocator_pool * pools
const struct wined3d_allocator_ops * ops
struct wined3d_blend_state_desc desc
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops
struct wine_rb_entry entry
void(* blitter_destroy)(struct wined3d_blitter *blitter, struct wined3d_context *context)
DWORD(* blitter_blit)(struct wined3d_blitter *blitter, enum wined3d_blit_op op, struct wined3d_context *context, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, DWORD src_location, const RECT *src_rect, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, DWORD dst_location, const RECT *dst_rect, const struct wined3d_color_key *colour_key, enum wined3d_texture_filter_type filter, const struct wined3d_format *resolve_format)
void(* blitter_clear)(struct wined3d_blitter *blitter, struct wined3d_device *device, unsigned int rt_count, const struct wined3d_fb_state *fb, unsigned int rect_count, const RECT *clear_rects, const RECT *draw_rect, uint32_t flags, const struct wined3d_color *colour, float depth, unsigned int stencil)
struct wined3d_blitter * next
const struct wined3d_blitter_ops * ops
struct wined3d_bo * buffer_object
struct list users
size_t memory_offset
uint8_t refcount
unsigned int client_map_count
size_t buffer_offset
struct wined3d_range * dirty_ranges
struct wined3d_bo * buffer_object
const struct wined3d_buffer_ops * buffer_ops
SIZE_T dirty_ranges_capacity
unsigned int structure_byte_stride
struct wined3d_bo_user bo_user
struct wined3d_box mapped_box
struct upload_bo mapped_upload
enum wined3d_format_id dst_format
void(* convert)(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_color_key *colour_key)
struct wined3d_shader_thread_group_size thread_group_size
struct wined3d_bo * buffer_object
struct wined3d_device * device
DWORD update_shader_resource_bindings
DWORD transform_feedback_paused
struct wined3d_texture * texture
uint32_t dirty_graphics_states[WINED3D_BITMAP_SIZE(STATE_HIGHEST)]
struct wined3d_context::@351 current_rt
const struct wined3d_state_entry * state_table
enum fogsource fog_source
DWORD update_patch_vertex_count
struct wined3d_swapchain * swapchain
uint32_t dirty_compute_states[WINED3D_BITMAP_SIZE(STATE_COMPUTE_COUNT)]
DWORD update_compute_unordered_access_view_bindings
DWORD fixed_function_usage_map
unsigned int sub_resource_idx
const struct wined3d_d3d_info * d3d_info
struct wined3d_stream_info stream_info
DWORD uses_fbo_attached_resources
DWORD transform_feedback_active
DWORD last_was_dual_source_blend
unsigned int viewport_count
unsigned int scissor_rect_count
DWORD update_compute_shader_resource_bindings
DWORD update_multisample_state
DWORD update_unordered_access_view_bindings
HANDLE present_event
BOOL serialize_commands
LONG waiting_for_present
HMODULE wined3d_module
LONG waiting_for_event
struct wined3d_state state
struct list query_poll_list
uint32_t subpixel_viewport
uint32_t gpu_push_constants
struct fragment_caps ffp_fragment_caps
uint32_t viewport_array_index_any_shader
uint32_t full_ffp_varyings
uint32_t srgb_read_control
enum wined3d_feature_level feature_level
uint32_t texture_swizzle
struct wined3d_d3d_limits limits
uint32_t shader_double_precision
uint32_t wined3d_creation_flags
uint32_t emulated_flatshading
uint32_t draw_base_vertex_offset
uint32_t shader_output_interpolation
float filling_convention_offset
DWORD multisample_draw_location
uint32_t srgb_write_control
uint32_t unconditional_npot
unsigned int max_clip_distances
unsigned int vs_version
unsigned int ds_version
unsigned int gs_version
unsigned int texture_size
unsigned int varying_count
unsigned int ffp_vertex_blend_matrices
unsigned int max_rt_count
unsigned int ps_version
unsigned int sample_count
unsigned int cs_version
unsigned int active_light_count
unsigned int hs_version
struct wine_rb_entry entry
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops
struct wined3d_depth_stencil_state_desc desc
void(* reference_command_list)(struct wined3d_device_context *context, struct wined3d_command_list *list)
bool(* unmap_upload_bo)(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_box *box, struct upload_bo *upload_bo)
void(* issue_query)(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags)
void(* flush)(struct wined3d_device_context *context)
void(* reference_resource)(struct wined3d_device_context *context, struct wined3d_resource *resource)
void(* submit)(struct wined3d_device_context *context, enum wined3d_cs_queue_id queue_id)
bool(* map_upload_bo)(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, uint32_t flags)
void(* finish)(struct wined3d_device_context *context, enum wined3d_cs_queue_id queue_id)
struct wined3d_device * device
const struct wined3d_device_context_ops * ops
struct wined3d_state * state
struct wined3d_context context_no3d
struct wined3d_device d
CRITICAL_SECTION bo_map_lock
unsigned int max_frame_latency
struct wined3d_device_parent * device_parent
unsigned char surface_alignment
const struct wined3d_shader_backend_ops * shader_backend
struct wined3d * wined3d
struct wine_rb_tree ffp_vertex_shaders ffp_pixel_shaders
struct wined3d_state_entry state_table[STATE_HIGHEST+1]
struct wine_rb_tree so_descs
struct wined3d_texture * cursor_texture
struct wined3d_blitter * blitter
struct wined3d_buffer * push_constants[WINED3D_PUSH_CONSTANTS_COUNT]
struct wined3d_texture * logo_texture
APPLYSTATEFUNC * multistate_funcs[STATE_HIGHEST+1]
struct list resources
struct wine_rb_tree samplers rasterizer_states blend_states depth_stencil_states
struct wined3d_context ** contexts
struct wined3d_sampler * null_sampler
struct wined3d_swapchain ** swapchains
struct wined3d_device_creation_parameters create_parms
struct wined3d_sampler * default_sampler
struct wined3d_cs * cs
struct wined3d_rendertarget_view * back_buffer_view
struct wined3d_rendertarget_view * auto_depth_stencil_view
struct wined3d_adapter * adapter
union wined3d_dispatch_parameters::@349 u
struct wined3d_direct_dispatch_parameters direct
enum wined3d_tessellator_domain tessellator_domain
struct wined3d_direct_draw_parameters direct
union wined3d_draw_parameters::@350 u
unsigned int version_high
enum wined3d_pci_vendor vendor
enum wined3d_pci_device device
unsigned int version_low
struct wined3d_rendertarget_view * depth_stencil
struct wined3d_rendertarget_view * render_targets[WINED3D_MAX_RENDER_TARGETS]
struct wined3d_ffp_ps_constants::wined3d_ffp_bumpenv_constants::@353 matrices[WINED3D_MAX_FFP_TEXTURES]
struct wined3d_color texture_constants[WINED3D_MAX_FFP_TEXTURES]
struct wined3d_ffp_ps_constants::wined3d_ffp_bumpenv_constants bumpenv
struct wined3d_color texture_factor
struct wined3d_color specular_enable
struct ffp_frag_desc entry
struct wined3d_shader * shader
struct wined3d_ffp_vs_constants::wined3d_ffp_point_constants point
struct wined3d_material material
struct wined3d_matrix texture_matrices[WINED3D_MAX_FFP_TEXTURES]
struct wined3d_matrix projection_matrix
struct wined3d_ffp_vs_constants::wined3d_ffp_light_constants light
union wined3d_ffp_vs_constants::wined3d_ffp_vs_modelview_matrices modelview
struct wine_rb_entry entry
struct wined3d_ffp_vs_settings settings
unsigned int texgen[WINED3D_MAX_FFP_TEXTURES]
struct wined3d_shader * shader
struct wined3d_ffp_vs_desc entry
struct wined3d_rational height_scale
void(* upload)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_row_pitch, unsigned dst_slice_pitch, unsigned int width, unsigned int height, unsigned int depth)
enum wined3d_ffp_emit_idx emit_idx
unsigned int attrs
unsigned int caps[WINED3D_GL_RES_TYPE_COUNT]
unsigned int component_count
enum wined3d_format_id id
enum wined3d_format_id typeless_id
void(* decompress)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_row_pitch, unsigned dst_slice_pitch, unsigned int width, unsigned int height, unsigned int depth)
D3DDDIFORMAT ddi_format
struct color_fixup_desc color_fixup
BOOL(* color_fixup_supported)(struct color_fixup_desc fixup)
const struct wined3d_state_entry_template * states
void(* free_context_data)(struct wined3d_context *context)
void(* free_private)(struct wined3d_device *device, struct wined3d_context *context)
unsigned int(* get_emul_mask)(const struct wined3d_adapter *adapter)
void(* fp_disable)(const struct wined3d_context *context)
BOOL(* allocate_context_data)(struct wined3d_context *context)
void(* fp_apply_draw_state)(struct wined3d_context *context, const struct wined3d_state *state)
void(* get_caps)(const struct wined3d_adapter *adapter, struct fragment_caps *caps)
const struct wined3d_stream_output_desc * so_desc
enum wined3d_primitive_type output_type
enum wined3d_primitive_type input_type
enum wined3d_pci_vendor vendor
enum wined3d_pci_device device
enum wined3d_display_driver driver
struct wined3d_shader_phase * control_point
struct wined3d_shader_phase * fork
unsigned int output_vertex_count
enum wined3d_tessellator_output_primitive tessellator_output_primitive
struct wined3d_hull_shader::@357 phases
enum wined3d_tessellator_partitioning tessellator_partitioning
struct wined3d_shader_phase * join
struct wined3d_buffer * buffer
struct wined3d_color diffuse specular ambient
struct rb_entry entry
unsigned int OriginalIndex
struct list changed_entry
struct wined3d_light OriginalParms
const struct wined3d_light_info * lights[WINED3D_MAX_ACTIVE_LIGHTS]
struct rb_tree lights_tree
D3DDDI_VIDEO_PRESENT_SOURCE_ID vidpn_source_id
struct wined3d_adapter * adapter
struct wined3d_display_mode * modes
WCHAR device_name[CCHDEVICENAME]
unsigned int ordinal
D3DKMT_HANDLE kmt_device
enum wined3d_format_id screen_format
RGBQUAD colors[256]
struct wined3d_device * device
unsigned int size
unsigned int declared_in_count
enum wined3d_shader_register_type depth_output
unsigned int input_reg_map[MAX_REG_INPUT]
uint32_t interpolation_mode[WINED3D_PACKED_INTERPOLATION_SIZE]
BOOL(* query_issue)(struct wined3d_query *query, uint32_t flags)
BOOL(* query_poll)(struct wined3d_query *query, uint32_t flags)
void(* query_destroy)(struct wined3d_query *query)
const void * data
const struct wined3d_parent_ops * parent_ops
enum wined3d_query_state state
const struct wined3d_query_ops * query_ops
unsigned int buffer_object
struct wined3d_device * device
enum wined3d_query_type type
struct list poll_list_entry
unsigned int size
unsigned int offset
struct wined3d_device * device
struct wined3d_rasterizer_state_desc desc
const struct wined3d_parent_ops * parent_ops
struct wine_rb_entry entry
struct wined3d_view_desc desc
struct wined3d_resource * resource
const struct wined3d_parent_ops * parent_ops
const struct wined3d_format * format
HRESULT(* resource_sub_resource_get_desc)(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
void(* resource_unload)(struct wined3d_resource *resource)
HRESULT(* resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx)
void(* resource_sub_resource_get_map_pitch)(struct wined3d_resource *resource, unsigned int sub_resource_idx, unsigned int *row_pitch, unsigned int *slice_pitch)
ULONG(* resource_incref)(struct wined3d_resource *resource)
HRESULT(* resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx, void **map_ptr, const struct wined3d_box *box, uint32_t flags)
void(* resource_preload)(struct wined3d_resource *resource)
ULONG(* resource_decref)(struct wined3d_resource *resource)
unsigned int format_attrs
const struct wined3d_parent_ops * parent_ops
struct wined3d_client_resource client
enum wined3d_resource_type type
struct wined3d_device * device
unsigned int access
struct list resource_list_entry
enum wined3d_gl_resource_type gl_type
const struct wined3d_format * format
unsigned int format_caps
unsigned int bind_flags
const struct wined3d_resource_ops * resource_ops
unsigned int priority
enum wined3d_multisample_type multisample_type
struct wined3d_sampler_desc desc
struct wine_rb_entry entry
const struct wined3d_parent_ops * parent_ops
struct wined3d_device * device
unsigned int max_sm_hs
unsigned int max_gl_version
enum wined3d_shader_backend shader_backend
unsigned int max_sm_vs
unsigned int cs_multithreaded
unsigned int multisample_textures
unsigned int max_sm_ps
unsigned int max_sm_cs
unsigned int max_sm_ds
unsigned int strict_shader_math
unsigned int sample_count
unsigned int max_sm_gs
unsigned short pci_vendor_id
enum wined3d_renderer renderer
unsigned short pci_device_id
enum wined3d_decl_usage usage
void(* shader_apply_compute_state)(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
void(* shader_apply_draw_state)(void *shader_priv, struct wined3d_context *context, const struct wined3d_state *state)
void(* shader_free_private)(struct wined3d_device *device, struct wined3d_context *context)
BOOL(* shader_allocate_context_data)(struct wined3d_context *context)
void(* shader_update_float_vertex_constants)(struct wined3d_device *device, UINT start, UINT count)
void(* shader_init_context_state)(struct wined3d_context *context)
void(* shader_precompile)(void *shader_priv, struct wined3d_shader *shader)
void(* shader_update_float_pixel_constants)(struct wined3d_device *device, UINT start, UINT count)
void(* shader_free_context_data)(struct wined3d_context *context)
void(* shader_disable)(void *shader_priv, struct wined3d_context *context)
void(* shader_get_caps)(const struct wined3d_adapter *adapter, struct shader_caps *caps)
HRESULT(* shader_alloc_private)(struct wined3d_device *device, const struct wined3d_vertex_pipe_ops *vertex_pipe, const struct wined3d_fragment_pipe_ops *fragment_pipe)
BOOL(* shader_color_fixup_supported)(struct color_fixup_desc fixup)
void(* shader_handle_instruction)(const struct wined3d_shader_instruction *)
uint64_t(* shader_compile)(struct wined3d_context *context, const struct wined3d_shader_desc *shader_desc, enum wined3d_shader_type shader_type)
void(* shader_destroy)(struct wined3d_shader *shader)
const struct wined3d_shader_reg_maps * reg_maps
const struct wined3d_shader * shader
struct wined3d_string_buffer * buffer
struct wined3d_shader_parser_state * state
struct wined3d_shader_tex_mx * tex_mx
struct wined3d_shader_register reg
void(* shader_read_header)(void *data, const DWORD **ptr, struct wined3d_shader_version *shader_version)
BOOL(* shader_is_end)(void *data, const DWORD **ptr)
void(* shader_free)(void *data)
void(* shader_read_instruction)(void *data, const DWORD **ptr, struct wined3d_shader_instruction *ins)
struct wined3d_shader_dst_param first_register
enum wined3d_data_type resource_data_type
struct wined3d_shader_primitive_type primitive_type
struct wined3d_shader_tgsm_structured tgsm_structured
enum wined3d_tessellator_partitioning tessellator_partitioning
const struct wined3d_shader_src_param * src
union wined3d_shader_instruction::@348 declaration
struct wined3d_shader_semantic semantic
const struct wined3d_shader_dst_param * dst
enum wined3d_shader_resource_type resource_type
struct wined3d_shader_function_table_pointer fp
const struct wined3d_shader_src_param * predicate
enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx
struct wined3d_shader_indexable_temp indexable_temp
struct wined3d_shader_structured_resource structured_resource
struct wined3d_shader_index_range index_range
enum wined3d_tessellator_output_primitive tessellator_output_primitive
enum wined3d_tessellator_domain tessellator_domain
struct wined3d_shader_tgsm_raw tgsm_raw
const struct wined3d_shader_context * ctx
const struct wined3d_shader_immediate_constant_buffer * icb
struct wined3d_shader_texel_offset texel_offset
struct wined3d_shader_thread_group_size thread_group_size
struct wined3d_shader_register_semantic register_semantic
unsigned int instance_count
unsigned int temporary_count
enum wined3d_primitive_type type
UINT cb_sizes[WINED3D_MAX_CBS]
struct wined3d_shader_version shader_version
DWORD texcoord_mask[MAX_REG_TEXCRD]
union wined3d_shader_reg_maps::@346 u
struct wined3d_shader_tgsm * tgsm
const struct wined3d_shader_immediate_constant_buffer * icb
struct wined3d_shader_sampler_map sampler_map
BYTE output_registers_mask[MAX_REG_OUTPUT]
uint32_t resource_map[WINED3D_BITMAP_SIZE(MAX_SHADER_RESOURCE_VIEWS)]
struct wined3d_shader_resource_info resource_info[MAX_SHADER_RESOURCE_VIEWS]
struct wined3d_shader_resource_info uav_resource_info[MAX_UNORDERED_ACCESS_VIEWS]
const struct wined3d_shader_src_param * rel_addr
enum wined3d_shader_input_sysval_semantic sysval_semantic
struct wined3d_shader_dst_param reg
enum wined3d_shader_register_type type
struct wined3d_shader_register_index idx[2]
unsigned int immconst_data[4]
enum wined3d_data_type data_type
union wined3d_shader_register::@347 u
enum wined3d_immconst_type immconst_type
enum wined3d_shader_resource_type type
enum wined3d_data_type data_type
struct wined3d_resource * resource
const struct wined3d_parent_ops * parent_ops
struct wined3d_view_desc desc
const struct wined3d_format * format
unsigned int sampler_idx
unsigned int bind_idx
unsigned int resource_idx
struct wined3d_shader_sampler_map_entry * entries
struct wined3d_shader_dst_param reg
enum wined3d_decl_usage usage
enum wined3d_data_type resource_data_type
enum wined3d_shader_resource_type resource_type
enum wined3d_component_type component_type
enum wined3d_sysval_semantic sysval_semantic
struct wined3d_shader_signature_element * elements
enum wined3d_shader_src_modifier modifiers
struct wined3d_shader_register reg
struct wined3d_shader_dst_param reg
unsigned int texcoord_w[2]
struct wined3d_shader_dst_param reg
struct wined3d_shader_dst_param reg
enum wined3d_shader_type type
unsigned int functionLength
union wined3d_shader::@358 u
struct list constantsB
struct wined3d_shader_signature output_signature
struct wined3d_shader_signature patch_constant_signature
unsigned int byte_code_size
struct list constantsI
struct wined3d_domain_shader ds
struct list constantsF
struct wined3d_compute_shader cs
struct wined3d_shader_signature input_signature
const DWORD * function
const struct wined3d_parent_ops * parent_ops
struct wined3d_pixel_shader ps
struct wined3d_vertex_shader vs
const struct wined3d_shader_limits * limits
struct wined3d_shader_reg_maps reg_maps
const struct wined3d_shader_frontend * frontend
struct list shader_list_entry
struct wined3d_geometry_shader gs
struct list linked_programs
enum vkd3d_shader_source_type source_type
struct wined3d_device * device
struct wined3d_hull_shader hs
struct wined3d_stream_output_desc desc
struct wine_rb_entry entry
struct wined3d_stream_output_element elements[1]
unsigned int state
unsigned int extension
APPLYSTATEFUNC apply
unsigned int representative
enum wined3d_format_id index_format
enum wined3d_primitive_type primitive_type
struct wined3d_vertex_declaration * vertex_declaration
struct wined3d_depth_stencil_state * depth_stencil_state
unsigned int patch_vertex_count
struct wined3d_vec4 clip_planes[WINED3D_MAX_CLIP_DISTANCES]
unsigned int scissor_rect_count
RECT scissor_rects[WINED3D_MAX_VIEWPORTS]
unsigned int render_states[WINEHIGHEST_RENDER_STATE+1]
unsigned int viewport_count
unsigned int stencil_ref
struct wined3d_color blend_factor
struct wined3d_light_state light_state
enum wined3d_feature_level feature_level
struct wined3d_buffer * index_buffer
struct wined3d_blend_state * blend_state
struct wined3d_viewport viewports[WINED3D_MAX_VIEWPORTS]
struct wined3d_rasterizer_state * rasterizer_state
uint32_t sample_mask
uint32_t texture_states[WINED3D_MAX_FFP_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE+1]
struct wined3d_query * predicate
struct wined3d_constant_buffer_state cb[WINED3D_SHADER_TYPE_COUNT][MAX_CONSTANT_BUFFERS]
struct wined3d_stream_state streams[WINED3D_MAX_STREAMS]
unsigned int index_offset
struct wined3d_fb_state fb
struct wined3d_matrix transforms[WINED3D_HIGHEST_TRANSFORM_STATE+1]
struct wined3d_unordered_access_view * unordered_access_view[WINED3D_PIPELINE_COUNT][MAX_UNORDERED_ACCESS_VIEWS]
struct wined3d_shader_resource_view * shader_resource_view[WINED3D_SHADER_TYPE_COUNT][MAX_SHADER_RESOURCE_VIEWS]
const struct wined3d_format * format
struct wined3d_stream_info_element elements[MAX_ATTRIBS]
void(* swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain)
void(* swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, unsigned int swap_interval, uint32_t flags)
struct wined3d_swapchain_state_parent * parent
struct wined3d_display_mode original_mode d3d_mode
struct wined3d * wined3d
struct wined3d_swapchain_desc desc
struct wined3d_texture ** back_buffers
unsigned int swap_interval
LARGE_INTEGER last_present_time
const struct wined3d_format * ds_format
const struct wined3d_swapchain_ops * swapchain_ops
struct wined3d_palette * palette
unsigned int max_frame_latency
struct wined3d_texture * front_buffer
struct wined3d_swapchain_state state
struct wined3d_gamma_ramp orig_gamma
const struct wined3d_parent_ops * parent_ops
struct wined3d_device * device
struct wined3d_texture * dst_texture
struct wined3d_color_key src_blt_color_key
struct wined3d_color_key dst_blt_color_key
struct wined3d_color_key src_overlay_color_key
struct wined3d_color_key dst_overlay_color_key
const struct wined3d_parent_ops * parent_ops
union wined3d_texture::wined3d_texture_sub_resource::@354 clear_value
void(* texture_unload_location)(struct wined3d_texture *texture, struct wined3d_context *context, unsigned int location)
BOOL(* texture_load_location)(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, unsigned int location)
BOOL(* texture_prepare_location)(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, unsigned int location)
void(* texture_download_data)(struct wined3d_context *context, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, unsigned int src_location, const struct wined3d_box *src_box, const struct wined3d_bo_address *dst_bo_addr, const struct wined3d_format *dst_format, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, unsigned int dst_row_pitch, unsigned int dst_slice_pitch)
void(* texture_upload_data)(struct wined3d_context *context, const struct wined3d_const_bo_address *src_bo_addr, const struct wined3d_format *src_format, const struct wined3d_box *src_box, unsigned int src_row_pitch, unsigned int src_slice_pitch, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, unsigned int dst_location, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z)
struct wined3d_texture::wined3d_overlay_info * overlay_info
struct wined3d_color_key src_blt_color_key
unsigned int sysmem_count
struct wined3d_shader_resource_view * identity_srv
struct wined3d_texture::wined3d_dc_info * dc_info
uint32_t color_key_flags
unsigned int slice_pitch
struct wined3d_texture::wined3d_texture_sub_resource * sub_resources
const struct wined3d_texture_ops * texture_ops
struct wined3d_swapchain * swapchain
unsigned int lod
unsigned int row_pitch
struct wined3d_texture::wined3d_texture_async async
struct wined3d_texture::wined3d_dirty_regions * dirty_regions
unsigned int level_count
unsigned int download_count
struct wined3d_bo * counter_bo
const struct wined3d_format * format
struct wined3d_view_desc desc
struct wined3d_resource * resource
const struct wined3d_parent_ops * parent_ops
const struct wined3d_format * format
enum wined3d_input_classification input_slot_class
struct wined3d_vertex_declaration_element * elements
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops
void(* vp_get_caps)(const struct wined3d_adapter *adapter, struct wined3d_vertex_caps *caps)
const struct wined3d_state_entry_template * vp_states
void(* vp_free)(struct wined3d_device *device, struct wined3d_context *context)
void(* vp_disable)(const struct wined3d_context *context)
unsigned int(* vp_get_emul_mask)(const struct wined3d_adapter *adapter)
void(* vp_apply_draw_state)(struct wined3d_context *context, const struct wined3d_state *state)
struct wined3d_shader_attribute attributes[MAX_ATTRIBS]
unsigned int adapter_count
unsigned int flags
struct wined3d_adapter * adapters[1]
#define max(a, b)
Definition: svc.c:63
static void invalidate()
rwlock_t lock
Definition: tcpcore.h:0
#define DWORD_PTR
Definition: treelist.c:76
GLfixed fx
Definition: tritemp.h:484
ULONG_PTR SIZE_T
Definition: typedefs.h:80
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
Definition: pdh_main.c:64
struct wined3d_ffp_vs_constants::wined3d_ffp_vs_modelview_matrices::@352 not_blended
struct wined3d_matrix modelview_matrices[MAX_VERTEX_BLENDS]
long sgn(REAL x)
Definition: varray.cc:48
vkd3d_shader_source_type
vkd3d_shader_visibility
Definition: vkd3d_shader.h:383
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
DWORD WINAPI GetCurrentThreadId(void)
Definition: thread.c:459
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
HICON HCURSOR
Definition: windef.h:99
#define HRESULT
Definition: msvc.h:7
UINT D3DKMT_HANDLE
Definition: d3dukmdt.h:28
enum _D3DDDIFORMAT D3DDDIFORMAT
UINT D3DDDI_VIDEO_PRESENT_SOURCE_ID
Definition: d3dukmdt.h:141
#define WINED3D_VIEW_READ_ONLY_DEPTH
Definition: wined3d.h:1584
wined3d_multisample_type
Definition: wined3d.h:572
wined3d_decl_usage
Definition: wined3d.h:806
#define WINED3D_NO_RASTERIZER_STREAM
Definition: wined3d.h:1577
wined3d_render_state
Definition: wined3d.h:288
@ WINED3D_RS_LIGHTING
Definition: wined3d.h:347
@ WINED3D_RS_COLORVERTEX
Definition: wined3d.h:351
@ WINED3D_RS_SPECULARMATERIALSOURCE
Definition: wined3d.h:356
@ WINED3D_RS_SRGBWRITEENABLE
Definition: wined3d.h:400
@ WINED3D_RS_AMBIENTMATERIALSOURCE
Definition: wined3d.h:357
@ WINED3D_RS_DIFFUSEMATERIALSOURCE
Definition: wined3d.h:355
@ WINED3D_RS_EMISSIVEMATERIALSOURCE
Definition: wined3d.h:358
#define WINED3D_VIEW_READ_ONLY_STENCIL
Definition: wined3d.h:1585
wined3d_primitive_type
Definition: wined3d.h:74
@ WINED3D_PT_LINELIST
Definition: wined3d.h:77
@ WINED3D_PT_PATCH
Definition: wined3d.h:86
@ WINED3D_PT_POINTLIST
Definition: wined3d.h:76
@ WINED3D_PT_TRIANGLELIST_ADJ
Definition: wined3d.h:84
@ WINED3D_PT_LINELIST_ADJ
Definition: wined3d.h:82
@ WINED3D_PT_TRIANGLELIST
Definition: wined3d.h:79
static int wined3d_bit_scan(unsigned int *x)
Definition: wined3d.h:2982
wined3d_decl_method
Definition: wined3d.h:795
wined3d_material_color_source
Definition: wined3d.h:520
@ WINED3D_MCS_COLOR2
Definition: wined3d.h:523
@ WINED3D_MCS_MATERIAL
Definition: wined3d.h:521
@ WINED3D_MCS_COLOR1
Definition: wined3d.h:522
#define WINED3D_BIND_VERTEX_BUFFER
Definition: wined3d.h:909
wined3d_sampler_state
Definition: wined3d.h:554
#define WINED3D_MAX_STREAM_OUTPUT_BUFFERS
Definition: wined3d.h:1576
#define WINED3D_RESOURCE_ACCESS_GPU
Definition: wined3d.h:51
#define WINED3D_RESOURCE_ACCESS_CPU
Definition: wined3d.h:52
wined3d_resource_type
Definition: wined3d.h:716
@ WINED3D_RTYPE_BUFFER
Definition: wined3d.h:718
@ WINED3D_RTYPE_TEXTURE_3D
Definition: wined3d.h:721
#define WINED3D_MAX_VIEWPORTS
Definition: wined3d.h:1590
#define WINED3D_MAX_RENDER_TARGETS
Definition: wined3d.h:1606
#define WINED3D_MAX_FRAGMENT_SAMPLERS
Definition: wined3d.h:1598
wined3d_texture_filter_type
Definition: wined3d.h:704
wined3d_texture_stage_state
Definition: wined3d.h:593
wined3d_query_type
Definition: wined3d.h:725
#define WINED3D_BIND_SHADER_RESOURCE
Definition: wined3d.h:912
wined3d_format_id
Definition: wined3d.h:126
@ WINED3DFMT_UNKNOWN
Definition: wined3d.h:127
#define WINED3D_BIND_INDIRECT_BUFFER
Definition: wined3d.h:917
#define WINED3D_MAX_STREAMS
Definition: wined3d.h:1596
wined3d_renderer
Definition: wined3d.h:57
wined3d_pipeline
Definition: wined3d.h:854
@ WINED3D_PIPELINE_COUNT
Definition: wined3d.h:857
wined3d_texture_op
Definition: wined3d.h:627
static void wined3d_box_set(struct wined3d_box *box, unsigned int left, unsigned int top, unsigned int right, unsigned int bottom, unsigned int front, unsigned int back)
Definition: wined3d.h:3006
wined3d_cmp_func
Definition: wined3d.h:460
@ WINED3D_CMP_ALWAYS
Definition: wined3d.h:468
wined3d_feature_level
Definition: wined3d.h:98
#define WINED3D_MAX_CLIP_DISTANCES
Definition: wined3d.h:1601
wined3d_shader_type
Definition: wined3d.h:840
@ WINED3D_SHADER_TYPE_PIXEL
Definition: wined3d.h:841
@ WINED3D_SHADER_TYPE_GEOMETRY
Definition: wined3d.h:843
@ WINED3D_SHADER_TYPE_VERTEX
Definition: wined3d.h:842
@ WINED3D_SHADER_TYPE_COUNT
Definition: wined3d.h:849
#define WINED3D_BIND_RENDER_TARGET
Definition: wined3d.h:914
#define WINED3D_HIGHEST_TEXTURE_STATE
Definition: wined3d.h:614
wined3d_transform_state
Definition: wined3d.h:666
#define WINED3D_MAX_FFP_TEXTURES
Definition: wined3d.h:1597
#define WINED3D_HIGHEST_TRANSFORM_STATE
Definition: wined3d.h:684
wined3d_device_type
Definition: wined3d.h:90
#define WINED3D_PIXEL_CENTER_INTEGER
Definition: wined3d.h:1328
#define WINED3D_BIND_CONSTANT_BUFFER
Definition: wined3d.h:911
#define WINED3D_SRGB_READ_WRITE_CONTROL
Definition: wined3d.h:1330
#define WINED3D_BIND_INDEX_BUFFER
Definition: wined3d.h:910
wined3d_input_classification
Definition: wined3d.h:1825
#define WINEHIGHEST_RENDER_STATE
Definition: wined3d.h:415
void WINAPI wined3d_mutex_unlock(void)
Definition: wined3d_main.c:544
void WINAPI wined3d_mutex_lock(void)
Definition: wined3d_main.c:539
struct wined3d_allocator_block * wined3d_allocator_allocate(struct wined3d_allocator *allocator, struct wined3d_context *context, unsigned int memory_type, size_t size)
Definition: utils.c:7234
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, uint32_t location)
Definition: texture.c:702
void wined3d_device_context_emit_set_light(struct wined3d_device_context *context, const struct wined3d_light_info *light)
Definition: cs.c:2083
void string_buffer_list_cleanup(struct wined3d_string_buffer_list *list)
Definition: shader.c:544
static BOOL wined3d_bitmap_clear(uint32_t *map, unsigned int idx)
void wined3d_device_context_emit_set_shader_resource_views(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_shader_resource_view *const *views)
Definition: cs.c:1659
static ULONG wined3d_atomic_decrement_mutex_lock(volatile LONG *refcount)
const char * debug_d3dusage(uint32_t usage)
Definition: utils.c:4895
static void context_apply_state(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
HRESULT texture2d_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, uint32_t flags, const struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter)
Definition: surface.c:1342
bool wined3d_allocator_init(struct wined3d_allocator *allocator, size_t pool_count, const struct wined3d_allocator_ops *allocator_ops)
Definition: utils.c:7265
void wined3d_cs_destroy(struct wined3d_cs *cs)
Definition: cs.c:3657
void wined3d_allocator_cleanup(struct wined3d_allocator *allocator)
Definition: utils.c:7163
void wined3d_rendertarget_view_prepare_location(struct wined3d_rendertarget_view *view, struct wined3d_context *context, uint32_t location)
Definition: view.c:469
wined3d_component_type
@ WINED3D_TYPE_UINT
@ WINED3D_TYPE_UNKNOWN
@ WINED3D_TYPE_FLOAT
@ WINED3D_TYPE_INT
static float float_24_to_32(DWORD in)
BOOL wined3d_get_primary_adapter_luid(LUID *luid)
Definition: utils.c:5761
#define STATE_COMPUTE_COUNT
static BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
void context_set_tls_idx(DWORD idx)
Definition: context_gl.c:1561
static bool wined3d_rtv_overlaps_srv(const struct wined3d_rendertarget_view *rtv, const struct wined3d_shader_resource_view *srv)
static unsigned int wined3d_bitmap_ffs(const uint32_t *bitmap, unsigned int bit_count, unsigned int start)
static unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture, unsigned int level)
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
static bool wined3d_context_is_graphics_state_dirty(const struct wined3d_context *context, unsigned int state_id)
static bool isStateDirty(const struct wined3d_context *context, unsigned int state_id)
void wined3d_unordered_access_view_copy_counter(struct wined3d_unordered_access_view *view, struct wined3d_buffer *buffer, unsigned int offset, struct wined3d_context *context)
Definition: view.c:1739
void state_nop(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: ffp_gl.c:42
void wined3d_release_dc(HWND window, HDC dc)
Definition: utils.c:6658
#define D3DCOLOR_B_G(dw)
const struct wined3d_shader_backend_ops glsl_shader_backend
#define MAX_SAMPLER_OBJECTS
void wined3d_device_context_emit_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
Definition: cs.c:2881
void state_cleanup(struct wined3d_state *state)
Definition: stateblock.c:648
void string_buffer_clear(struct wined3d_string_buffer *buffer)
Definition: shader.c:411
const struct wined3d_vertex_pipe_ops none_vertex_pipe
Definition: ffp_gl.c:1489
const char * wined3d_debug_bind_flags(uint32_t bind_flags)
Definition: utils.c:4845
HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
Definition: device.c:1537
void wined3d_stateblock_invalidate_texture_lod(struct wined3d_stateblock *stateblock, struct wined3d_texture *texture)
BOOL wined3d_buffer_prepare_location(struct wined3d_buffer *buffer, struct wined3d_context *context, unsigned int location)
Definition: buffer.c:257
#define MAX_REG_OUTPUT
#define STATE_HIGHEST
wined3d_push_constants
@ WINED3D_PUSH_CONSTANTS_PS_FFP
@ WINED3D_PUSH_CONSTANTS_PS_B
@ WINED3D_PUSH_CONSTANTS_VS_B
@ WINED3D_PUSH_CONSTANTS_VS_FFP
@ WINED3D_PUSH_CONSTANTS_VS_I
@ WINED3D_PUSH_CONSTANTS_PS_F
@ WINED3D_PUSH_CONSTANTS_PS_I
@ WINED3D_PUSH_CONSTANTS_COUNT
@ WINED3D_PUSH_CONSTANTS_VS_F
const struct wined3d_gpu_description * wined3d_get_gpu_description(enum wined3d_pci_vendor vendor, enum wined3d_pci_device device)
Definition: directx.c:688
wined3d_shader_rel_op
@ WINED3D_SHADER_REL_OP_GT
@ WINED3D_SHADER_REL_OP_LE
@ WINED3D_SHADER_REL_OP_GE
@ WINED3D_SHADER_REL_OP_EQ
@ WINED3D_SHADER_REL_OP_LT
@ WINED3D_SHADER_REL_OP_NE
const char * debug_d3ddevicetype(enum wined3d_device_type device_type)
Definition: utils.c:4781
wined3d_channel_type
@ WINED3D_CHANNEL_TYPE_UNUSED
@ WINED3D_CHANNEL_TYPE_UNORM
@ WINED3D_CHANNEL_TYPE_STENCIL
@ WINED3D_CHANNEL_TYPE_FLOAT
@ WINED3D_CHANNEL_TYPE_SNORM
@ WINED3D_CHANNEL_TYPE_NONE
@ WINED3D_CHANNEL_TYPE_UINT
@ WINED3D_CHANNEL_TYPE_SINT
@ WINED3D_CHANNEL_TYPE_DEPTH
static BOOL is_scaling_fixup(struct color_fixup_desc fixup)
const char * debug_box(const struct wined3d_box *box)
Definition: utils.c:4552
BOOL wined3d_adapter_no3d_init_format_info(struct wined3d_adapter *adapter)
Definition: utils.c:4135
wined3d_data_type
@ WINED3D_DATA_UINT
@ WINED3D_DATA_INT
@ WINED3D_DATA_UAV
@ WINED3D_DATA_SAMPLER
@ WINED3D_DATA_SNORM
@ WINED3D_DATA_UNORM
@ WINED3D_DATA_RESOURCE
@ WINED3D_DATA_FLOAT
@ WINED3D_DATA_OPAQUE
wined3d_shader_interpolation_mode
@ WINED3DSIM_LINEAR_CENTROID
@ WINED3DSIM_LINEAR_NOPERSPECTIVE_SAMPLE
@ WINED3DSIM_LINEAR
@ WINED3DSIM_NONE
@ WINED3DSIM_LINEAR_NOPERSPECTIVE
@ WINED3DSIM_LINEAR_NOPERSPECTIVE_CENTROID
@ WINED3DSIM_LINEAR_SAMPLE
@ WINED3DSIM_CONSTANT
const struct wined3d_fragment_pipe_ops * wined3d_spirv_fragment_pipe_init_vk(void)
void wined3d_rendertarget_view_load_location(struct wined3d_rendertarget_view *view, struct wined3d_context *context, uint32_t location)
Definition: view.c:489
HRESULT wined3d_output_get_gamma_ramp(struct wined3d_output *output, struct wined3d_gamma_ramp *ramp)
Definition: directx.c:1772
const struct ffp_frag_desc * find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders, const struct ffp_frag_settings *settings)
Definition: utils.c:6419
WINED3D_SHADER_INSTRUCTION_HANDLER
@ WINED3DSIH_DSX_COARSE
@ WINED3DSIH_DCL_TESSELLATOR_PARTITIONING
@ WINED3DSIH_MOVC
@ WINED3DSIH_ULT
@ WINED3DSIH_SINCOS
@ WINED3DSIH_DCL_TEMPS
@ WINED3DSIH_LIT
@ WINED3DSIH_DP4
@ WINED3DSIH_GATHER4_PO_C
@ WINED3DSIH_ATOMIC_XOR
@ WINED3DSIH_TEXDEPTH
@ WINED3DSIH_MUL
@ WINED3DSIH_DSX_FINE
@ WINED3DSIH_DCL_OUTPUT
@ WINED3DSIH_DCL_FUNCTION_TABLE
@ WINED3DSIH_DCL_INPUT_SIV
@ WINED3DSIH_M3x3
@ WINED3DSIH_CALLNZ
@ WINED3DSIH_IMM_ATOMIC_XOR
@ WINED3DSIH_TEXREG2RGB
@ WINED3DSIH_IEQ
@ WINED3DSIH_DCL_INPUT
@ WINED3DSIH_TEXLDL
@ WINED3DSIH_CONTINUE
@ WINED3DSIH_CONTINUEP
@ WINED3DSIH_DEFI
@ WINED3DSIH_FIRSTBIT_HI
@ WINED3DSIH_IADD
@ WINED3DSIH_ABS
@ WINED3DSIH_SAMPLE_B
@ WINED3DSIH_LRP
@ WINED3DSIH_DCL_CONSTANT_BUFFER
@ WINED3DSIH_ROUND_Z
@ WINED3DSIH_DST
@ WINED3DSIH_DCL_INTERFACE
@ WINED3DSIH_TEXREG2AR
@ WINED3DSIH_TEXM3x3PAD
@ WINED3DSIH_IMM_ATOMIC_IADD
@ WINED3DSIH_TEXREG2GB
@ WINED3DSIH_LOOP
@ WINED3DSIH_DSY_COARSE
@ WINED3DSIH_M3x4
@ WINED3DSIH_SAMPLE_LOD
@ WINED3DSIH_SYNC
@ WINED3DSIH_ISHL
@ WINED3DSIH_SWITCH
@ WINED3DSIH_SWAPC
@ WINED3DSIH_SUB
@ WINED3DSIH_RCP
@ WINED3DSIH_F16TOF32
@ WINED3DSIH_IMIN
@ WINED3DSIH_STORE_STRUCTURED
@ WINED3DSIH_NOP
@ WINED3DSIH_ENDIF
@ WINED3DSIH_IMM_ATOMIC_UMAX
@ WINED3DSIH_STORE_UAV_TYPED
@ WINED3DSIH_FTOI
@ WINED3DSIH_LD
@ WINED3DSIH_TEXM3x3TEX
@ WINED3DSIH_EXP
@ WINED3DSIH_ATOMIC_IMAX
@ WINED3DSIH_DEFAULT
@ WINED3DSIH_UMAX
@ WINED3DSIH_OR
@ WINED3DSIH_ROUND_PI
@ WINED3DSIH_SAMPLE_GRAD
@ WINED3DSIH_ATOMIC_AND
@ WINED3DSIH_TEXM3x3VSPEC
@ WINED3DSIH_DCL_INPUT_SGV
@ WINED3DSIH_IF
@ WINED3DSIH_ATOMIC_UMIN
@ WINED3DSIH_UMIN
@ WINED3DSIH_ATOMIC_OR
@ WINED3DSIH_DCL_INPUT_PS_SGV
@ WINED3DSIH_LD2DMS
@ WINED3DSIH_LOG
@ WINED3DSIH_TEXM3x2DEPTH
@ WINED3DSIH_SAMPLE
@ WINED3DSIH_MOV
@ WINED3DSIH_DCL_IMMEDIATE_CONSTANT_BUFFER
@ WINED3DSIH_HS_DECLS
@ WINED3DSIH_AND
@ WINED3DSIH_NRM
@ WINED3DSIH_DCL_THREAD_GROUP
@ WINED3DSIH_CRS
@ WINED3DSIH_UMUL
@ WINED3DSIH_DCL_OUTPUT_SIV
@ WINED3DSIH_DCL_INDEX_RANGE
@ WINED3DSIH_DCL_TESSELLATOR_OUTPUT_PRIMITIVE
@ WINED3DSIH_ATOMIC_CMP_STORE
@ WINED3DSIH_LD_RAW
@ WINED3DSIH_GATHER4
@ WINED3DSIH_TEXM3x3
@ WINED3DSIH_UTOF
@ WINED3DSIH_ELSE
@ WINED3DSIH_HS_CONTROL_POINT_PHASE
@ WINED3DSIH_DEFB
@ WINED3DSIH_LD_STRUCTURED
@ WINED3DSIH_ENDSWITCH
@ WINED3DSIH_ATOMIC_IADD
@ WINED3DSIH_RSQ
@ WINED3DSIH_SQRT
@ WINED3DSIH_IMM_ATOMIC_AND
@ WINED3DSIH_DP2ADD
@ WINED3DSIH_TEXM3x2TEX
@ WINED3DSIH_IMM_ATOMIC_CONSUME
@ WINED3DSIH_EQ
@ WINED3DSIH_IMM_ATOMIC_UMIN
@ WINED3DSIH_ADD
@ WINED3DSIH_HS_FORK_PHASE
@ WINED3DSIH_BREAK
@ WINED3DSIH_NOT
@ WINED3DSIH_XOR
@ WINED3DSIH_BFREV
@ WINED3DSIH_FRC
@ WINED3DSIH_SAMPLE_INFO
@ WINED3DSIH_EVAL_CENTROID
@ WINED3DSIH_DSX
@ WINED3DSIH_DCL
@ WINED3DSIH_COUNTBITS
@ WINED3DSIH_IMM_ATOMIC_CMP_EXCH
@ WINED3DSIH_DCL_VERTICES_OUT
@ WINED3DSIH_CALL
@ WINED3DSIH_HS_JOIN_PHASE
@ WINED3DSIH_USHR
@ WINED3DSIH_ENDREP
@ WINED3DSIH_F32TOF16
@ WINED3DSIH_EMIT
@ WINED3DSIH_BEM
@ WINED3DSIH_TEXDP3TEX
@ WINED3DSIH_TEXBEML
@ WINED3DSIH_ILT
@ WINED3DSIH_DCL_OUTPUT_TOPOLOGY
@ WINED3DSIH_DCL_HS_MAX_TESSFACTOR
@ WINED3DSIH_TEXM3x3SPEC
@ WINED3DSIH_BREAKC
@ WINED3DSIH_UBFE
@ WINED3DSIH_ATOMIC_IMIN
@ WINED3DSIH_SETP
@ WINED3DSIH_BREAKP
@ WINED3DSIH_BFI
@ WINED3DSIH_DCL_SAMPLER
@ WINED3DSIH_TEXBEM
@ WINED3DSIH_DCL_GS_INSTANCES
@ WINED3DSIH_DCL_TGSM_RAW
@ WINED3DSIH_M3x2
@ WINED3DSIH_DCL_UAV_TYPED
@ WINED3DSIH_MIN
@ WINED3DSIH_TEXLDD
@ WINED3DSIH_TABLE_SIZE
@ WINED3DSIH_GE
@ WINED3DSIH_SLT
@ WINED3DSIH_DP3
@ WINED3DSIH_CUT
@ WINED3DSIH_REP
@ WINED3DSIH_EMIT_STREAM
@ WINED3DSIH_SAMPLE_POS
@ WINED3DSIH_FTOU
@ WINED3DSIH_RET
@ WINED3DSIH_IMAX
@ WINED3DSIH_ITOF
@ WINED3DSIH_IGE
@ WINED3DSIH_IMM_ATOMIC_IMAX
@ WINED3DSIH_IFC
@ WINED3DSIH_SAMPLE_C_LZ
@ WINED3DSIH_LOD
@ WINED3DSIH_ENDLOOP
@ WINED3DSIH_DSY
@ WINED3DSIH_TEXDP3
@ WINED3DSIH_MOVA
@ WINED3DSIH_DCL_INPUT_PS
@ WINED3DSIH_GATHER4_C
@ WINED3DSIH_LD_UAV_TYPED
@ WINED3DSIH_INEG
@ WINED3DSIH_DEF
@ WINED3DSIH_GATHER4_PO
@ WINED3DSIH_DCL_UAV_STRUCTURED
@ WINED3DSIH_CMP
@ WINED3DSIH_LT
@ WINED3DSIH_DCL_HS_FORK_PHASE_INSTANCE_COUNT
@ WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT
@ WINED3DSIH_DCL_GLOBAL_FLAGS
@ WINED3DSIH_TEXKILL
@ WINED3DSIH_POW
@ WINED3DSIH_CND
@ WINED3DSIH_UDIV
@ WINED3DSIH_EVAL_SAMPLE_INDEX
@ WINED3DSIH_ROUND_NI
@ WINED3DSIH_M4x3
@ WINED3DSIH_TEXM3x2PAD
@ WINED3DSIH_INE
@ WINED3DSIH_IBFE
@ WINED3DSIH_BUFINFO
@ WINED3DSIH_STORE_RAW
@ WINED3DSIH_IMM_ATOMIC_ALLOC
@ WINED3DSIH_IMM_ATOMIC_IMIN
@ WINED3DSIH_UGE
@ WINED3DSIH_MAD
@ WINED3DSIH_CUT_STREAM
@ WINED3DSIH_TEX
@ WINED3DSIH_DCL_TESSELLATOR_DOMAIN
@ WINED3DSIH_EXPP
@ WINED3DSIH_LABEL
@ WINED3DSIH_IMM_ATOMIC_EXCH
@ WINED3DSIH_FCALL
@ WINED3DSIH_CASE
@ WINED3DSIH_IMUL
@ WINED3DSIH_IMAD
@ WINED3DSIH_NE
@ WINED3DSIH_SGE
@ WINED3DSIH_FIRSTBIT_SHI
@ WINED3DSIH_RESINFO
@ WINED3DSIH_DCL_INPUT_PS_SIV
@ WINED3DSIH_DCL_TGSM_STRUCTURED
@ WINED3DSIH_FIRSTBIT_LO
@ WINED3DSIH_M4x4
@ WINED3DSIH_SAMPLE_C
@ WINED3DSIH_ROUND_NE
@ WINED3DSIH_DCL_UAV_RAW
@ WINED3DSIH_TEXM3x3DIFF
@ WINED3DSIH_DCL_FUNCTION_BODY
@ WINED3DSIH_SGN
@ WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT
@ WINED3DSIH_LOGP
@ WINED3DSIH_IMM_ATOMIC_OR
@ WINED3DSIH_DCL_STREAM
@ WINED3DSIH_DIV
@ WINED3DSIH_TEXCOORD
@ WINED3DSIH_ATOMIC_UMAX
@ WINED3DSIH_DCL_INDEXABLE_TEMP
@ WINED3DSIH_DCL_RESOURCE_RAW
@ WINED3DSIH_MAX
@ WINED3DSIH_DCL_INPUT_PRIMITIVE
@ WINED3DSIH_RETP
@ WINED3DSIH_ISHR
@ WINED3DSIH_DCL_HS_JOIN_PHASE_INSTANCE_COUNT
@ WINED3DSIH_DP2
@ WINED3DSIH_PHASE
@ WINED3DSIH_DSY_FINE
@ WINED3DSIH_DCL_RESOURCE_STRUCTURED
const char * debug_ivec4(const struct wined3d_ivec4 *v)
Definition: utils.c:4569
enum wined3d_format_id wined3d_get_typed_format_id(const struct wined3d_adapter *adapter, const struct wined3d_format *format, enum wined3d_channel_type channel_type)
Definition: utils.c:4460
static unsigned int wined3d_bitmap_ffz(const uint32_t *bitmap, unsigned int bit_count, unsigned int start)
void wined3d_buffer_update_sub_resource(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct upload_bo *upload_bo, unsigned int offset, unsigned int size)
Definition: buffer.c:827
void get_modelview_matrix(const struct wined3d_stateblock_state *state, unsigned int index, struct wined3d_matrix *mat)
Definition: utils.c:5588
void wined3d_device_context_push_constants(struct wined3d_device_context *context, enum wined3d_push_constants type, uint32_t update_mask, unsigned int start_idx, unsigned int count, const void *constants)
Definition: cs.c:2231
const char * debug_d3dformat(enum wined3d_format_id format_id)
Definition: utils.c:4605
static uint32_t float_to_int(float f)
DWORD wined3d_rendertarget_view_get_locations(const struct wined3d_rendertarget_view *view)
Definition: view.c:520
int shader_vaddline(struct wined3d_string_buffer *buffer, const char *fmt, va_list args)
Definition: shader.c:453
static struct color_fixup_desc create_complex_fixup_desc(enum complex_fixup complex_fixup)
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain)
Definition: swapchain.c:1814
const struct wined3d_shader_frontend sm4_shader_frontend
Definition: shader_sm4.c:1831
void wined3d_rendertarget_view_validate_location(struct wined3d_rendertarget_view *view, uint32_t location)
Definition: view.c:495
#define WINED3D_MAX_CBS
wined3d_tessellator_output_primitive
@ WINED3D_TESSELLATOR_OUTPUT_POINT
@ WINED3D_TESSELLATOR_OUTPUT_TRIANGLE_CW
@ WINED3D_TESSELLATOR_OUTPUT_TRIANGLE_CCW
@ WINED3D_TESSELLATOR_OUTPUT_LINE
const struct wined3d_format * wined3d_resource_get_decompress_format(const struct wined3d_resource *resource)
Definition: resource.c:447
BOOL wined3d_filter_messages(HWND window, BOOL filter)
Definition: wined3d_main.c:605
void get_fog_start_end(const struct wined3d_context *context, const struct wined3d_state *state, float *start, float *end)
Definition: utils.c:5703
struct wined3d_adapter * wined3d_adapter_gl_create(unsigned int ordinal, unsigned int wined3d_creation_flags)
Definition: adapter_gl.c:5190
BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage)
Definition: shader.c:366
BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, struct wined3d_context *context, uint32_t location)
Definition: buffer.c:269
void compute_normal_matrix(struct wined3d_matrix *normal_matrix, BOOL legacy_lighting, const struct wined3d_matrix *modelview)
Definition: utils.c:7042
static BOOL wined3d_bitmap_get_range(const uint32_t *bitmap, unsigned int bit_count, unsigned int start, struct wined3d_range *range)
wined3d_ffp_idx
@ WINED3D_FFP_TEXCOORD4
@ WINED3D_FFP_PSIZE
@ WINED3D_FFP_TEXCOORD3
@ WINED3D_FFP_SPECULAR
@ WINED3D_FFP_TEXCOORD7
@ WINED3D_FFP_TEXCOORD1
@ WINED3D_FFP_POSITION
@ WINED3D_FFP_NORMAL
@ WINED3D_FFP_TEXCOORD5
@ WINED3D_FFP_BLENDWEIGHT
@ WINED3D_FFP_TEXCOORD2
@ WINED3D_FFP_DIFFUSE
@ WINED3D_FFP_TEXCOORD6
@ WINED3D_FFP_BLENDINDICES
@ WINED3D_FFP_TEXCOORD0
@ WINED3D_FFP_ATTRIBS_COUNT
static int wined3d_uint64_compare(uint64_t x, uint64_t y)
static void wined3d_resource_get_sub_resource_map_pitch(struct wined3d_resource *resource, unsigned int sub_resource_idx, unsigned int *row_pitch, unsigned int *slice_pitch)
uint32_t wined3d_format_pack(const struct wined3d_format *format, const struct wined3d_uvec4 *value)
Definition: utils.c:5778
void wined3d_adapter_cleanup(struct wined3d_adapter *adapter)
Definition: directx.c:176
HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, enum wined3d_resource_type type, const struct wined3d_format *format, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality, unsigned int usage, unsigned int bind_flags, unsigned int access, unsigned int width, unsigned int height, unsigned int depth, unsigned int size, void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops)
const char * wined3d_debug_feature_level(enum wined3d_feature_level level)
Definition: utils.c:6619
static void wined3d_rtv_bind_count_dec(struct wined3d_rendertarget_view *rtv)
static void * wined3d_texture_allocate_object_memory(SIZE_T s, SIZE_T level_count, SIZE_T layer_count)
const char * debug_d3dtexturestate(enum wined3d_texture_stage_state state)
Definition: utils.c:5214
wined3d_shader_sync_flags
@ WINED3DSSF_THREAD_GROUP
@ WINED3DSSF_GROUP_SHARED_MEMORY
@ WINED3DSSF_GLOBAL_UAV
const char * debug_d3dinput_classification(enum wined3d_input_classification classification)
Definition: utils.c:4978
wined3d_shader_src_modifier
@ WINED3DSPSM_ABSNEG
@ WINED3DSPSM_X2NEG
@ WINED3DSPSM_BIAS
@ WINED3DSPSM_BIASNEG
@ WINED3DSPSM_COMP
@ WINED3DSPSM_ABS
@ WINED3DSPSM_NOT
@ WINED3DSPSM_SIGNNEG
@ WINED3DSPSM_DW
@ WINED3DSPSM_X2
@ WINED3DSPSM_SIGN
@ WINED3DSPSM_NONE
@ WINED3DSPSM_NEG
@ WINED3DSPSM_DZ
static DWORD wined3d_extract_bits(const uint32_t *bitstream, unsigned int offset, unsigned int count)
#define MAX_CONSTANT_BUFFERS
void wined3d_swapchain_state_cleanup(struct wined3d_swapchain_state *state)
Definition: wined3d_main.c:942
BOOL is_invalid_op(const struct wined3d_state *state, int stage, enum wined3d_texture_op op, DWORD arg1, DWORD arg2, DWORD arg3)
Definition: utils.c:5554
void find_ds_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct ds_compile_args *args, const struct wined3d_context *context)
Definition: shader.c:2838
void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_access_view *view, uint32_t location)
Definition: view.c:1564
static void wined3d_device_bo_map_lock(struct wined3d_device *device)
static bool wined3d_is_srv_rtv_bound(const struct wined3d_state *state, const struct wined3d_shader_resource_view *srv)
wined3d_ffp_emit_idx
@ WINED3D_FFP_EMIT_D3DCOLOR
@ WINED3D_FFP_EMIT_FLOAT16_2
@ WINED3D_FFP_EMIT_UBYTE4N
@ WINED3D_FFP_EMIT_COUNT
@ WINED3D_FFP_EMIT_FLOAT2
@ WINED3D_FFP_EMIT_SHORT4N
@ WINED3D_FFP_EMIT_USHORT2N
@ WINED3D_FFP_EMIT_SHORT2N
@ WINED3D_FFP_EMIT_UBYTE4
@ WINED3D_FFP_EMIT_FLOAT4
@ WINED3D_FFP_EMIT_INVALID
@ WINED3D_FFP_EMIT_UDEC3
@ WINED3D_FFP_EMIT_DEC3N
@ WINED3D_FFP_EMIT_FLOAT3
@ WINED3D_FFP_EMIT_FLOAT16_4
@ WINED3D_FFP_EMIT_USHORT4N
@ WINED3D_FFP_EMIT_SHORT2
@ WINED3D_FFP_EMIT_SHORT4
@ WINED3D_FFP_EMIT_FLOAT1
BOOL shader_get_stream_output_register_info(const struct wined3d_shader *shader, const struct wined3d_stream_output_element *so_element, unsigned int *register_idx, unsigned int *component_idx)
Definition: shader.c:2117
static BOOL use_transform_feedback(const struct wined3d_state *state)
#define WINED3D_BITMAP_SIZE(x)
HRESULT wined3d_resource_check_box_dimensions(struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box)
Definition: resource.c:488
static BOOL shader_sampler_is_shadow(const struct wined3d_shader *shader, const struct ps_compile_args *ps_args, unsigned int resource_idx, unsigned int sampler_idx)
wined3d_vertex_processing_mode
@ WINED3D_VP_MODE_NONE
@ WINED3D_VP_MODE_FF
@ WINED3D_VP_MODE_SHADER
static void wined3d_cs_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
static void wined3d_vec4_transform(struct wined3d_vec4 *dst, const struct wined3d_vec4 *v, const struct wined3d_matrix *m)
void wined3d_cs_emit_present(struct wined3d_cs *cs, struct wined3d_swapchain *swapchain, const RECT *src_rect, const RECT *dst_rect, HWND dst_window_override, unsigned int swap_interval, uint32_t flags)
Definition: cs.c:748
wined3d_pci_vendor
@ HW_VENDOR_INTEL
@ HW_VENDOR_NVIDIA
@ HW_VENDOR_REDHAT
@ HW_VENDOR_AMD
@ HW_VENDOR_SOFTWARE
@ HW_VENDOR_VMWARE
const struct wined3d_shader_backend_ops none_shader_backend
Definition: shader.c:2060
void wined3d_texture_clear_dirty_regions(struct wined3d_texture *texture)
Definition: texture.c:753
static BOOL use_vs(const struct wined3d_state *state)
static void wined3d_device_bo_map_unlock(struct wined3d_device *device)
static void shader_get_position_fixup(const struct wined3d_context *context, const struct wined3d_state *state, unsigned int fixup_count, float *position_fixup)
static void wined3d_not_from_cs(const struct wined3d_cs *cs)
HRESULT wined3d_rendertarget_view_no3d_init(struct wined3d_rendertarget_view *view_no3d, const struct wined3d_view_desc *desc, struct wined3d_resource *resource, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: view.c:649
static void wined3d_srv_bind_count_inc(struct wined3d_shader_resource_view *srv)
void context_invalidate_compute_state(struct wined3d_context *context, DWORD state_id)
Definition: context.c:66
static unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture, unsigned int level)
void void string_buffer_release(struct wined3d_string_buffer_list *list, struct wined3d_string_buffer *buffer)
Definition: shader.c:532
HRESULT wined3d_shader_create_ffp_vs(struct wined3d_device *device, const struct wined3d_ffp_vs_settings *settings, struct wined3d_shader **shader)
Definition: shader.c:3345
void wined3d_ffp_get_fs_settings(const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info, struct ffp_frag_settings *settings)
Definition: utils.c:6141
const char * debug_d3dsamplerstate(enum wined3d_sampler_state state)
Definition: utils.c:5169
BOOL invert_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m)
Definition: utils.c:6775
void wined3d_resource_memory_colour_fill(struct wined3d_resource *resource, const struct wined3d_map_desc *map, const struct wined3d_color *colour, const struct wined3d_box *box, bool full_subresource)
Definition: resource.c:601
#define PRINTF_ATTR(fmt, args)
const char * wined3d_debug_location(uint32_t location)
Definition: utils.c:6588
wined3d_shader_dst_modifier
@ WINED3DSPDM_MSAMPCENTROID
@ WINED3DSPDM_PARTIALPRECISION
@ WINED3DSPDM_SATURATE
@ WINED3DSPDM_NONE
static BOOL wined3d_ge_wrap(ULONG x, ULONG y)
struct wined3d_string_buffer * string_buffer_get(struct wined3d_string_buffer_list *list)
Definition: shader.c:484
void wined3d_shader_resource_view_cleanup(struct wined3d_shader_resource_view *view)
Definition: view.c:978
static bool wined3d_state_uses_depth_buffer(const struct wined3d_state *state)
void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_draw_parameters *draw_parameters)
Definition: context_gl.c:4648
struct wined3d_output * wined3d_swapchain_get_output(const struct wined3d_swapchain *swapchain)
Definition: swapchain.c:287
void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state)
Definition: buffer.c:484
UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT alignment, UINT width, UINT height, UINT depth)
Definition: utils.c:4519
void wined3d_device_context_emit_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view)
Definition: cs.c:2908
#define MAX_REG_INPUT
wined3d_sysval_semantic
@ WINED3D_SV_INSTANCE_ID
@ WINED3D_SV_CULL_DISTANCE
@ WINED3D_SV_CLIP_DISTANCE
@ WINED3D_SV_VIEWPORT_ARRAY_INDEX
@ WINED3D_SV_TESS_FACTOR_QUADINT
@ WINED3D_SV_SAMPLE_INDEX
@ WINED3D_SV_IS_FRONT_FACE
@ WINED3D_SV_TESS_FACTOR_QUADEDGE
@ WINED3D_SV_TESS_FACTOR_LINEDET
@ WINED3D_SV_POSITION
@ WINED3D_SV_PRIMITIVE_ID
@ WINED3D_SV_RENDER_TARGET_ARRAY_INDEX
@ WINED3D_SV_TESS_FACTOR_TRIINT
@ WINED3D_SV_TESS_FACTOR_TRIEDGE
@ WINED3D_SV_TESS_FACTOR_LINEDEN
@ WINED3D_SV_VERTEX_ID
void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: ffp_gl.c:1266
static void wined3d_resource_wait_idle(const struct wined3d_resource *resource)
static enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup)
static HRESULT wined3d_resource_get_sub_resource_desc(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
int shader_addline(struct wined3d_string_buffer *buffer, const char *fmt,...) PRINTF_ATTR(2
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: context_gl.c:3426
void wined3d_device_destroy_default_samplers(struct wined3d_device *device)
Definition: device.c:784
const char * wined3d_debug_resource_access(uint32_t access)
Definition: utils.c:4828
static BOOL wined3d_shader_instruction_has_texel_offset(const struct wined3d_shader_instruction *ins)
const char * debug_const_bo_address(const struct wined3d_const_bo_address *address)
Definition: utils.c:4593
static bool wined3d_texture_is_full_rect(const struct wined3d_texture *texture, unsigned int level, const RECT *r)
static struct wined3d_texture * wined3d_state_get_ffp_texture(const struct wined3d_state *state, unsigned int idx)
static void wined3d_context_flush_bo_address(struct wined3d_context *context, const struct wined3d_const_bo_address *data, size_t size)
const struct wined3d_fragment_pipe_ops none_fragment_pipe
Definition: ffp_gl.c:1514
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, HWND window, int x, int y, int width, int height)
Definition: swapchain.c:2225
void wined3d_texture_translate_drawable_coords(const struct wined3d_texture *texture, HWND window, RECT *rect)
Definition: texture.c:91
static BOOL wined3d_dsv_srv_conflict(const struct wined3d_rendertarget_view *dsv, const struct wined3d_format *srv_format)
#define MAX_UNORDERED_ACCESS_VIEWS
static void wined3d_pause(unsigned int *spin_count)
void context_invalidate_state(struct wined3d_context *context, unsigned int state_id)
Definition: context.c:76
const char * debug_vec4(const struct wined3d_vec4 *v)
Definition: utils.c:4585
const struct wined3d_shader_backend_ops * wined3d_spirv_shader_backend_init_vk(void)
static BOOL is_complex_fixup(struct color_fixup_desc fixup)
#define WINED3D_MAX_DEVICE_IDENTIFIER_LENGTH
void wined3d_context_cleanup(struct wined3d_context *context)
Definition: context.c:48
fixup_channel_source
@ CHANNEL_SOURCE_COMPLEX1
@ CHANNEL_SOURCE_ONE
@ CHANNEL_SOURCE_W
@ CHANNEL_SOURCE_X
@ CHANNEL_SOURCE_ZERO
@ CHANNEL_SOURCE_Z
@ CHANNEL_SOURCE_Y
@ CHANNEL_SOURCE_COMPLEX0
BOOL wined3d_clip_blit(const RECT *clip_rect, RECT *clipped, RECT *other)
Definition: utils.c:6672
void wined3d_device_context_emit_set_rendertarget_views(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, struct wined3d_rendertarget_view *const *views)
Definition: cs.c:1343
bool wined3d_texture_validate_sub_resource_idx(const struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: texture.c:50
BOOL wined3d_get_app_name(char *app_name, unsigned int app_name_size)
Definition: wined3d_main.c:241
static int wined3d_uint32_compare(uint32_t x, uint32_t y)
void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
Definition: cs.c:2419
ssize_t adapter_adjust_mapped_memory(struct wined3d_adapter *adapter, ssize_t size)
Definition: directx.c:167
const char * debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
Definition: utils.c:5009
wined3d_shader_resource_type
@ WINED3D_SHADER_RESOURCE_BUFFER
@ WINED3D_SHADER_RESOURCE_TEXTURE_3D
@ WINED3D_SHADER_RESOURCE_TEXTURE_2D
@ WINED3D_SHADER_RESOURCE_TEXTURE_1DARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DARRAY
@ WINED3D_SHADER_RESOURCE_NONE
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DMSARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_2DMS
@ WINED3D_SHADER_RESOURCE_TEXTURE_CUBEARRAY
@ WINED3D_SHADER_RESOURCE_TEXTURE_CUBE
@ WINED3D_SHADER_RESOURCE_TEXTURE_1D
#define WINED3D_MAX_ACTIVE_LIGHTS
void get_identity_matrix(struct wined3d_matrix *mat)
Definition: utils.c:5575
void wined3d_device_context_emit_set_vertex_declaration(struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
Definition: cs.c:1414
#define WINED3D_CS_QUEUE_SIZE
static void context_release(struct wined3d_context *context)
bool vshader_get_input(const struct wined3d_shader *shader, uint8_t usage_req, uint8_t usage_idx_req, unsigned int *regnum)
Definition: shader.c:2766
void find_gs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct gs_compile_args *args, const struct wined3d_context *context)
Definition: shader.c:2858
void wined3d_device_context_set_depth_bounds(struct wined3d_device_context *context, bool enable, float min_depth, float max_depth)
Definition: cs.c:1871
static BOOL is_same_fixup(struct color_fixup_desc f1, struct color_fixup_desc f2)
void find_ps_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, BOOL position_transformed, struct ps_compile_args *args, const struct wined3d_context *context)
Definition: shader.c:2871
const char * debug_shader_type(enum wined3d_shader_type shader_type)
Definition: utils.c:5313
const char * debug_d3dtstype(enum wined3d_transform_state tstype)
Definition: utils.c:5282
void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain)
Definition: texture.c:1263
static enum wined3d_cmp_func wined3d_sanitize_cmp_func(enum wined3d_cmp_func func)
wined3d_shader_uav_flags
@ WINED3DSUF_ORDER_PRESERVING_COUNTER
@ WINED3DSUF_GLOBALLY_COHERENT
void state_init(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info, uint32_t flags, enum wined3d_feature_level feature_level)
Definition: stateblock.c:2324
static void wined3d_colour_srgb_from_linear(struct wined3d_color *colour_srgb, const struct wined3d_color *colour)
void wined3d_format_convert_from_float(const struct wined3d_format *format, const struct wined3d_color *color, void *ret)
Definition: utils.c:5817
void wined3d_cs_emit_add_dirty_texture_region(struct wined3d_cs *cs, struct wined3d_texture *texture, unsigned int layer)
Definition: cs.c:2828
static void wined3d_device_context_unlock(struct wined3d_device_context *context)
void wined3d_unordered_access_view_cleanup(struct wined3d_unordered_access_view *view)
Definition: view.c:1531
static float float_16_to_32(const unsigned short *in)
fog_src_type
@ VS_FOG_COORD
@ VS_FOG_W
@ VS_FOG_Z
bool wined3d_driver_info_init(struct wined3d_driver_info *driver_info, const struct wined3d_gpu_description *gpu_description, enum wined3d_feature_level feature_level, UINT64 vram_bytes, UINT64 sysmem_bytes)
Definition: directx.c:740
#define WINED3D_ALLOCATOR_CHUNK_ORDER_COUNT
HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d, unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags, BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count, const BOOL *supported_extensions, struct wined3d_device_parent *device_parent)
Definition: device.c:5479
static void wined3d_buffer_validate_user(struct wined3d_buffer *buffer)
const char * debug_uvec4(const struct wined3d_uvec4 *v)
Definition: utils.c:4577
void wined3d_buffer_acquire_bo_for_write(struct wined3d_buffer *buffer, struct wined3d_context *context)
Definition: buffer.c:750
struct wined3d_blitter * wined3d_cpu_blitter_create(void)
Definition: surface.c:1300
void wined3d_device_context_emit_clear_uav(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, bool fp)
Definition: cs.c:2854
void get_texture_matrix(const struct wined3d_stateblock_state *state, const unsigned int tex, struct wined3d_matrix *mat)
Definition: utils.c:5671
static BOOL can_use_texture_swizzle(const struct wined3d_d3d_info *d3d_info, const struct wined3d_format *format)
wined3d_shader_input_sysval_semantic
@ WINED3D_SIV_VIEWPORT_ARRAY_INDEX
@ WINED3D_SIV_TRIANGLE_INNER_TESS_FACTOR
@ WINED3D_SIV_CULL_DISTANCE
@ WINED3D_SIV_QUAD_V0_TESS_FACTOR
@ WINED3D_SIV_POSITION
@ WINED3D_SIV_IS_FRONT_FACE
@ WINED3D_SIV_QUAD_V_INNER_TESS_FACTOR
@ WINED3D_SIV_TRIANGLE_U_TESS_FACTOR
@ WINED3D_SIV_INSTANCE_ID
@ WINED3D_SIV_TRIANGLE_W_TESS_FACTOR
@ WINED3D_SIV_RENDER_TARGET_ARRAY_INDEX
@ WINED3D_SIV_QUAD_U0_TESS_FACTOR
@ WINED3D_SIV_CLIP_DISTANCE
@ WINED3D_SIV_QUAD_U1_TESS_FACTOR
@ WINED3D_SIV_SAMPLE_INDEX
@ WINED3D_SIV_TRIANGLE_V_TESS_FACTOR
@ WINED3D_SIV_LINE_DETAIL_TESS_FACTOR
@ WINED3D_SIV_LINE_DENSITY_TESS_FACTOR
@ WINED3D_SIV_VERTEX_ID
@ WINED3D_SIV_QUAD_V1_TESS_FACTOR
@ WINED3D_SIV_PRIMITIVE_ID
@ WINED3D_SIV_QUAD_U_INNER_TESS_FACTOR
#define WINED3D_FORMAT_CAP_SRGB_WRITE
static uint32_t wined3d_mask_from_size(unsigned int size)
BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context)
Definition: device.c:84
void wined3d_texture_cleanup(struct wined3d_texture *texture)
Definition: texture.c:1593
DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_context *context, struct wined3d_bo_address *data)
Definition: buffer.c:369
void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch)
Definition: cs.c:2766
void wined3d_device_context_emit_set_texture_state(struct wined3d_device_context *context, unsigned int stage, enum wined3d_texture_stage_state state, unsigned int value)
Definition: cs.c:1914
void string_buffer_free(struct wined3d_string_buffer *buffer)
Definition: shader.c:430
static void wined3d_rtv_bind_count_inc(struct wined3d_rendertarget_view *rtv)
const char * debug_d3dstate(uint32_t state)
Definition: utils.c:5331
HRESULT wined3d_shader_create_ffp_ps(struct wined3d_device *device, const struct ffp_frag_settings *settings, struct wined3d_shader **shader)
Definition: shader.c:3370
void wined3d_rendertarget_view_get_drawable_size(const struct wined3d_rendertarget_view *view, const struct wined3d_context *context, unsigned int *width, unsigned int *height)
Definition: view.c:437
static const char * wined3d_get_line(const char **ptr, const char *end)
static const struct color_fixup_desc COLOR_FIXUP_IDENTITY
static BOOL wined3d_bitmap_set(uint32_t *map, unsigned int idx)
struct wined3d_adapter * wined3d_adapter_vk_create(unsigned int ordinal, unsigned int wined3d_creation_flags)
Definition: adapter_vk.c:2555
static bool wined3d_primitive_type_is_list(enum wined3d_primitive_type t)
void find_vs_compile_args(const struct wined3d_state *state, const struct wined3d_shader *shader, struct vs_compile_args *args, const struct wined3d_context *context)
Definition: shader.c:2689
static BOOL is_rasterization_disabled(const struct wined3d_shader *geometry_shader)
void wined3d_device_context_emit_set_stream_outputs(struct wined3d_device_context *context, const struct wined3d_stream_output outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS])
Definition: cs.c:1481
enum vkd3d_shader_visibility vkd3d_shader_visibility_from_wined3d(enum wined3d_shader_type shader_type)
Definition: shader.c:309
unsigned int wined3d_resource_get_sample_count(const struct wined3d_resource *resource)
Definition: resource.c:456
static ULONG wined3d_resource_decref(struct wined3d_resource *resource)
void wined3d_ftoa(float value, char *s)
Definition: utils.c:6643
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource)
Definition: device.c:5340
int wined3d_ffp_frag_program_key_compare(const void *key, const struct wine_rb_entry *entry)
Definition: utils.c:6436
bool wined3d_allocator_chunk_init(struct wined3d_allocator_chunk *chunk, struct wined3d_allocator *allocator)
Definition: utils.c:7141
void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, uint32_t location)
Definition: buffer.c:131
void wined3d_device_context_emit_set_clip_plane(struct wined3d_device_context *context, unsigned int plane_idx, const struct wined3d_vec4 *plane)
Definition: cs.c:1961
void wined3d_device_context_emit_set_feature_level(struct wined3d_device_context *context, enum wined3d_feature_level level)
Definition: cs.c:2129
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
Definition: cs.c:2440
void wined3d_device_context_emit_draw(struct wined3d_device_context *context, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count, bool indexed)
Definition: cs.c:1166
wined3d_tessellator_domain
@ WINED3D_TESSELLATOR_DOMAIN_TRIANGLE
@ WINED3D_TESSELLATOR_DOMAIN_QUAD
@ WINED3D_TESSELLATOR_DOMAIN_LINE
void * resource_offset_map_pointer(struct wined3d_resource *resource, unsigned int sub_resource_idx, uint8_t *base_memory, const struct wined3d_box *box)
Definition: resource.c:574
void multiply_matrix(struct wined3d_matrix *dest, const struct wined3d_matrix *src1, const struct wined3d_matrix *src2)
Definition: utils.c:1153
void wined3d_device_uninit_3d(struct wined3d_device *device)
Definition: device.c:1662
void wined3d_device_context_emit_set_transform(struct wined3d_device_context *context, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
Definition: cs.c:1940
#define MAX_IMMEDIATE_CONSTANT_BUFFER_SIZE
wined3d_shader_backend
@ WINED3D_SHADER_BACKEND_AUTO
@ WINED3D_SHADER_BACKEND_GLSL
@ WINED3D_SHADER_BACKEND_GLSL_VKD3D
void wined3d_texture_sub_resources_destroyed(struct wined3d_texture *texture)
Definition: texture.c:1111
void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
Definition: cs.c:1849
void get_pointsize_minmax(const struct wined3d_context *context, const struct wined3d_state *state, float *out_min, float *out_max)
Definition: utils.c:5684
void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_context *context, struct wined3d_depth_stencil_state *state, unsigned int stencil_ref)
Definition: cs.c:1828
static void wined3d_color_from_d3dcolor(struct wined3d_color *wined3d_color, DWORD d3d_color)
const char * debug_d3ddeclmethod(enum wined3d_decl_method method)
Definition: utils.c:4933
fogsource
@ FOGSOURCE_VS
@ FOGSOURCE_FFP
static BOOL wined3d_resource_access_is_managed(unsigned int access)
static void wined3d_insert_bits(uint32_t *bitstream, unsigned int offset, unsigned int count, DWORD bits)
void wined3d_device_context_emit_set_unordered_access_views(struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *views, const unsigned int *initial_count)
Definition: cs.c:1701
static unsigned short float_32_to_16(const float *in)
static void wined3d_state_reset(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
Definition: utils.c:4992
BOOL string_buffer_init(struct wined3d_string_buffer *buffer)
Definition: shader.c:417
const char * debug_d3drenderstate(enum wined3d_render_state state)
Definition: utils.c:5033
#define WINED3D_PAUSE_SPIN_COUNT
CRITICAL_SECTION wined3d_command_cs
Definition: wined3d_main.c:104
static BOOL is_identity_fixup(struct color_fixup_desc fixup)
static void wined3d_lock_init_(CRITICAL_SECTION *lock, const char *name)
void wined3d_swapchain_state_register(struct wined3d_swapchain_state *state)
Definition: wined3d_main.c:868
void wined3d_format_copy_data(const struct wined3d_format *format, const uint8_t *src, unsigned int src_row_pitch, unsigned int src_slice_pitch, uint8_t *dst, unsigned int dst_row_pitch, unsigned int dst_slice_pitch, unsigned int w, unsigned int h, unsigned int d)
Definition: utils.c:6080
void wined3d_texture_validate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, uint32_t location)
Definition: texture.c:678
static BOOL shader_is_scalar(const struct wined3d_shader_register *reg)
wined3d_gl_resource_type
@ WINED3D_GL_RES_TYPE_TEX_3D
@ WINED3D_GL_RES_TYPE_TEX_CUBE
@ WINED3D_GL_RES_TYPE_BUFFER
@ WINED3D_GL_RES_TYPE_TEX_2D
@ WINED3D_GL_RES_TYPE_RB
@ WINED3D_GL_RES_TYPE_TEX_1D
@ WINED3D_GL_RES_TYPE_COUNT
HRESULT wined3d_swapchain_no3d_init(struct wined3d_swapchain *swapchain_no3d, struct wined3d_device *device, const struct wined3d_swapchain_desc *desc, struct wined3d_swapchain_state_parent *state_parent, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: swapchain.c:1685
wined3d_shader_register_type
@ WINED3DSPR_CONSTBOOL
@ WINED3DSPR_RESOURCE
@ WINED3DSPR_COLOROUT
@ WINED3DSPR_RASTERIZER
@ WINED3DSPR_LOOP
@ WINED3DSPR_CONST
@ WINED3DSPR_PRIMID
@ WINED3DSPR_LOCALTHREADID
@ WINED3DSPR_FUNCTIONPOINTER
@ WINED3DSPR_CONST3
@ WINED3DSPR_IMMCONST
@ WINED3DSPR_OUTPOINTID
@ WINED3DSPR_OUTCONTROLPOINT
@ WINED3DSPR_INCONTROLPOINT
@ WINED3DSPR_TESSCOORD
@ WINED3DSPR_NULL
@ WINED3DSPR_CONSTINT
@ WINED3DSPR_GSINSTID
@ WINED3DSPR_ATTROUT
@ WINED3DSPR_CONST4
@ WINED3DSPR_THREADGROUPID
@ WINED3DSPR_STENCILREF
@ WINED3DSPR_ADDR
@ WINED3DSPR_LABEL
@ WINED3DSPR_JOININSTID
@ WINED3DSPR_DEPTHOUTGE
@ WINED3DSPR_UAV
@ WINED3DSPR_SAMPLER
@ WINED3DSPR_CONSTBUFFER
@ WINED3DSPR_FUNCTIONBODY
@ WINED3DSPR_IDXTEMP
@ WINED3DSPR_RASTOUT
@ WINED3DSPR_CONST2
@ WINED3DSPR_STREAM
@ WINED3DSPR_PATCHCONST
@ WINED3DSPR_OUTPUT
@ WINED3DSPR_PREDICATE
@ WINED3DSPR_INPUT
@ WINED3DSPR_GROUPSHAREDMEM
@ WINED3DSPR_SAMPLEMASK
@ WINED3DSPR_TEMP
@ WINED3DSPR_DEPTHOUT
@ WINED3DSPR_TEXCRDOUT
@ WINED3DSPR_THREADID
@ WINED3DSPR_COVERAGE
@ WINED3DSPR_TEXTURE
@ WINED3DSPR_LOCALTHREADINDEX
@ WINED3DSPR_FORKINSTID
@ WINED3DSPR_TEMPFLOAT16
@ WINED3DSPR_DEPTHOUTLE
@ WINED3DSPR_MISCTYPE
@ WINED3DSPR_IMMCONSTBUFFER
bool ffp_hlsl_compile_ps(const struct ffp_frag_settings *settings, struct wined3d_shader_desc *shader_desc)
Definition: ffp_hlsl.c:971
const struct wined3d_state_entry_template misc_state_template_gl[]
Definition: ffp_gl.c:1401
void wined3d_rendertarget_view_invalidate_location(struct wined3d_rendertarget_view *view, uint32_t location)
Definition: view.c:514
wined3d_display_driver
@ DRIVER_UNKNOWN
@ DRIVER_NVIDIA_GEFORCE6
@ DRIVER_NVIDIA_GEFORCE2MX
@ DRIVER_INTEL_GMA950
@ DRIVER_AMD_R600
@ DRIVER_INTEL_HD4000
@ DRIVER_AMD_RAGE_128PRO
@ DRIVER_INTEL_GMA900
@ DRIVER_NVIDIA_TNT
@ DRIVER_VMWARE
@ DRIVER_INTEL_GMA3000
@ DRIVER_NVIDIA_GEFORCEFX
@ DRIVER_NVIDIA_KEPLER
@ DRIVER_NVIDIA_GEFORCE8
@ DRIVER_REDHAT_VIRGL
@ DRIVER_INTEL_GMA800
@ DRIVER_WINE
@ DRIVER_AMD_RX
@ DRIVER_NVIDIA_FERMI
@ DRIVER_AMD_R100
@ DRIVER_AMD_R300
#define STATE_COMPUTE_OFFSET
#define D3DCOLOR_B_R(dw)
static size_t align(size_t addr, size_t alignment)
static void wined3d_context_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, unsigned int range_count, const struct wined3d_range *ranges)
void state_unbind_resources(struct wined3d_state *state)
Definition: stateblock.c:475
static bool wined3d_map_persistent(void)
void wined3d_device_cleanup(struct wined3d_device *device)
Definition: device.c:205
static BOOL needs_separate_srgb_gl_texture(const struct wined3d_context *context, const struct wined3d_texture *texture)
const struct wined3d_format * wined3d_get_format(const struct wined3d_adapter *adapter, enum wined3d_format_id format_id, unsigned int bind_flags)
Definition: utils.c:4428
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
Definition: utils.c:6740
void wined3d_buffer_validate_location(struct wined3d_buffer *buffer, uint32_t location)
Definition: buffer.c:102
const char * debug_bo_address(const struct wined3d_bo_address *address)
Definition: utils.c:4600
void device_context_remove(struct wined3d_device *device, struct wined3d_context *context)
Definition: device.c:118
static void wined3d_get_material_colour_source(enum wined3d_material_color_source *diffuse, enum wined3d_material_color_source *emissive, enum wined3d_material_color_source *ambient, enum wined3d_material_color_source *specular, const struct wined3d_state *state)
const char * debug_d3dtop(enum wined3d_texture_op d3dtop)
Definition: utils.c:5244
void wined3d_device_context_emit_set_render_state(struct wined3d_device_context *context, enum wined3d_render_state state, unsigned int value)
Definition: cs.c:1893
static void wined3d_resource_reference(struct wined3d_resource *resource)
const struct wined3d_shader_frontend sm1_shader_frontend
Definition: shader_sm1.c:804
void wined3d_context_init(struct wined3d_context *context, struct wined3d_swapchain *swapchain)
Definition: context.c:89
bool ffp_hlsl_compile_vs(const struct wined3d_ffp_vs_settings *settings, struct wined3d_shader_desc *shader_desc, struct wined3d_device *device)
Definition: ffp_hlsl.c:944
const struct wined3d_color_key_conversion * wined3d_format_get_color_key_conversion(const struct wined3d_texture *texture, BOOL need_alpha_ck)
Definition: utils.c:1293
static void wined3d_srv_bind_count_dec(struct wined3d_shader_resource_view *srv)
void wined3d_allocator_chunk_cleanup(struct wined3d_allocator_chunk *chunk)
Definition: utils.c:7117
void wined3d_device_context_emit_blt_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
Definition: cs.c:2703
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
Definition: cs.c:2299
const char * debug_d3dtexturefiltertype(enum wined3d_texture_filter_type filter_type)
Definition: utils.c:5194
wined3d_immconst_type
@ WINED3D_IMMCONST_VEC4
@ WINED3D_IMMCONST_SCALAR
const struct wined3d_fragment_pipe_ops glsl_fragment_pipe
void context_update_stream_info(struct wined3d_context *context, const struct wined3d_state *state)
Definition: context.c:258
BOOL wined3d_formats_are_srgb_variants(enum wined3d_format_id format1, enum wined3d_format_id format2)
Definition: utils.c:4535
static BOOL shader_constant_is_local(const struct wined3d_shader *shader, DWORD reg)
void(* SHADER_HANDLER)(const struct wined3d_shader_instruction *)
static BOOL needs_srgb_write(const struct wined3d_d3d_info *d3d_info, const struct wined3d_state *state, const struct wined3d_fb_state *fb)
BOOL wined3d_texture_can_use_pbo(const struct wined3d_texture *texture, const struct wined3d_d3d_info *d3d_info)
Definition: texture.c:59
C_ASSERT(WINED3D_CS_QUEUE_SIZE< UINT_MAX/4)
HRESULT wined3d_texture_no3d_init(struct wined3d_texture *texture_no3d, struct wined3d_device *device, const struct wined3d_resource_desc *desc, unsigned int layer_count, unsigned int level_count, uint32_t flags, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: texture.c:4570
wined3d_shader_global_flags
@ WINED3DSGF_REFACTORING_ALLOWED
@ WINED3DSGF_FORCE_EARLY_DEPTH_STENCIL
@ WINED3DSGF_ENABLE_RAW_AND_STRUCTURED_BUFFERS
const struct wined3d_light WINED3D_default_light
Definition: device.c:69
void wined3d_device_context_emit_set_light_enable(struct wined3d_device_context *context, unsigned int idx, BOOL enable)
Definition: cs.c:2110
void wined3d_device_context_emit_set_stream_sources(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
Definition: cs.c:1446
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, uint32_t flags, const struct wined3d_color *color, float depth, DWORD stencil)
Definition: cs.c:804
void wined3d_device_context_emit_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
Definition: cs.c:1511
static float wined3d_srgb_from_linear(float colour)
void wined3d_device_context_emit_set_constant_buffers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, const struct wined3d_constant_buffer_state *buffers)
Definition: cs.c:1546
static void wined3d_device_context_lock(struct wined3d_device_context *context)
static BOOL use_ps(const struct wined3d_state *state)
void wined3d_texture_upload_from_texture(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box)
Definition: texture.c:4335
bool wined3d_light_state_enable_light(struct wined3d_light_state *state, const struct wined3d_d3d_info *d3d_info, struct wined3d_light_info *light_info, BOOL enable)
Definition: stateblock.c:803
const char * debug_d3ddeclusage(enum wined3d_decl_usage usage)
Definition: utils.c:4952
static ULONG wined3d_resource_incref(struct wined3d_resource *resource)
wined3d_ffp_vs_fog_mode
@ WINED3D_FFP_VS_FOG_FOGCOORD
@ WINED3D_FFP_VS_FOG_OFF
@ WINED3D_FFP_VS_FOG_DEPTH
@ WINED3D_FFP_VS_FOG_RANGE
wined3d_query_state
@ QUERY_BUILDING
@ QUERY_SIGNALLED
@ QUERY_CREATED
BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal, const LUID *luid, const struct wined3d_adapter_ops *adapter_ops)
Definition: directx.c:3383
void wined3d_rendertarget_view_get_box(struct wined3d_rendertarget_view *view, struct wined3d_box *box)
Definition: view.c:542
static void wined3d_from_cs(const struct wined3d_cs *cs)
complex_fixup
@ COMPLEX_FIXUP_P8
@ COMPLEX_FIXUP_YUY2
@ COMPLEX_FIXUP_UYVY
@ COMPLEX_FIXUP_NV12
@ COMPLEX_FIXUP_YV12
@ COMPLEX_FIXUP_YUV
@ COMPLEX_FIXUP_NONE
#define D3DCOLOR_B_A(dw)
void wined3d_format_calculate_pitch(const struct wined3d_format *format, unsigned int alignment, unsigned int width, unsigned int height, unsigned int *row_pitch, unsigned int *slice_pitch)
Definition: utils.c:4489
void wined3d_rendertarget_view_cleanup(struct wined3d_rendertarget_view *view)
Definition: view.c:374
wined3d_tessellator_partitioning
@ WINED3D_TESSELLATOR_PARTITIONING_FRACTIONAL_ODD
@ WINED3D_TESSELLATOR_PARTITIONING_FRACTIONAL_EVEN
@ WINED3D_TESSELLATOR_PARTITIONING_INTEGER
@ WINED3D_TESSELLATOR_PARTITIONING_POW2
#define WINED3D_CS_CLIENT_WAIT_TIMEOUT
static void wined3d_texture_get_level_box(const struct wined3d_texture *texture, unsigned int level, struct wined3d_box *box)
void wined3d_device_context_emit_set_texture(struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int bind_index, struct wined3d_shader_resource_view *view)
Definition: cs.c:1621
void state_clipping(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: ffp_gl.c:535
#define D3DCOLOR_B_B(dw)
#define MAX_VERTEX_BLENDS
const struct wined3d_parent_ops wined3d_null_parent_ops
Definition: directx.c:3472
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource)
Definition: resource.c:406
static void wined3d_lock_cleanup(CRITICAL_SECTION *lock)
const char * wined3d_debug_view_desc(const struct wined3d_view_desc *d, const struct wined3d_resource *resource)
Definition: utils.c:4867
#define MAX_SHADER_RESOURCE_VIEWS
wined3d_shader_tex_types
@ WINED3D_SHADER_TEX_3D
@ WINED3D_SHADER_TEX_2D
@ WINED3D_SHADER_TEX_ERR
@ WINED3D_SHADER_TEX_CUBE
static bool wined3d_context_is_compute_state_dirty(const struct wined3d_context *context, unsigned int state_id)
static void * wined3d_context_map_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, size_t size, uint32_t map_flags)
void wined3d_resource_free_sysmem(struct wined3d_resource *resource)
Definition: resource.c:345
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: context_gl.c:3722
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
Definition: cs.c:1270
void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain, const struct wined3d_device *device)
Definition: swapchain.c:1374
void wined3d_device_context_emit_clear_rendertarget_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags, const struct wined3d_color *color, float depth, unsigned int stencil)
Definition: cs.c:844
static void wined3d_viewport_get_z_range(const struct wined3d_viewport *vp, float *min_z, float *max_z)
void context_resource_released(const struct wined3d_device *device, struct wined3d_resource *resource)
Definition: context.c:32
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource)
Definition: device.c:5358
void wined3d_format_get_float_color_key(const struct wined3d_format *format, const struct wined3d_color_key *key, struct wined3d_color *float_colors)
Definition: utils.c:5997
void wined3d_vk_blitter_create(struct wined3d_blitter **next)
Definition: texture.c:7048
#define WINED3D_PACKED_INTERPOLATION_SIZE
#define MAX_ATTRIBS
wined3d_ffp_ps_fog_mode
@ WINED3D_FFP_PS_FOG_EXP
@ WINED3D_FFP_PS_FOG_OFF
@ WINED3D_FFP_PS_FOG_EXP2
@ WINED3D_FFP_PS_FOG_LINEAR
void wined3d_texture_update_sub_resource(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, const struct upload_bo *upload_bo, const struct wined3d_box *box, unsigned int row_pitch, unsigned int slice_pitch)
Definition: texture.c:4440
static bool wined3d_srv_all_subresources(const struct wined3d_shader_resource_view *srv)
const char * debug_d3dshaderinstructionhandler(enum WINED3D_SHADER_INSTRUCTION_HANDLER handler_idx)
Definition: shader.c:301
void wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset, struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size)
Definition: buffer.c:808
HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx)
Definition: cs.c:2541
BOOL wined3d_format_is_depth_view(enum wined3d_format_id resource_format_id, enum wined3d_format_id view_format_id)
Definition: utils.c:4476
void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc)
Definition: utils.c:6426
const struct wined3d_gpu_description * wined3d_get_user_override_gpu_description(enum wined3d_pci_vendor vendor, enum wined3d_pci_device device)
Definition: directx.c:702
HRESULT wined3d_buffer_no3d_init(struct wined3d_buffer *buffer_no3d, struct wined3d_device *device, const struct wined3d_buffer_desc *desc, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops)
Definition: buffer.c:1040
void wined3d_device_context_emit_set_predication(struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value)
Definition: cs.c:1245
void wined3d_device_context_emit_reset_state(struct wined3d_device_context *context, bool invalidate)
Definition: cs.c:2269
void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *dispatch_parameters)
Definition: context_gl.c:4402
#define MAX_REG_TEXCRD
UINT64 adapter_adjust_memory(struct wined3d_adapter *adapter, INT64 amount)
Definition: directx.c:158
static BOOL wined3d_bitmap_is_set(const uint32_t *map, unsigned int idx)
void device_invalidate_state(const struct wined3d_device *device, unsigned int state)
Definition: device.c:5565
void cpu_blitter_clear_texture(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_box *box, const struct wined3d_color *colour)
Definition: surface.c:1128
void wined3d_buffer_cleanup(struct wined3d_buffer *buffer)
Definition: buffer.c:453
void wined3d_cs_init_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
Definition: cs.c:2304
void string_buffer_list_init(struct wined3d_string_buffer_list *list)
Definition: shader.c:539
HRESULT wined3d_context_no3d_init(struct wined3d_context *context_no3d, struct wined3d_swapchain *swapchain)
Definition: context.c:122
static void wined3d_context_destroy_bo(struct wined3d_context *context, struct wined3d_bo *bo)
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
Definition: device.c:5588
void(* APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id)
void wined3d_shader_resource_view_destroy(struct wined3d_shader_resource_view *view)
Definition: view.c:983
void * wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context)
Definition: buffer.c:362
void wined3d_swapchain_cleanup(struct wined3d_swapchain *swapchain)
Definition: swapchain.c:30
const struct wined3d_vertex_pipe_ops glsl_vertex_pipe
const struct wined3d_vertex_pipe_ops * wined3d_spirv_vertex_pipe_init_vk(void)
void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
Definition: cs.c:1800
static bool wined3d_rtv_all_subresources(const struct wined3d_rendertarget_view *rtv)
static float int_to_float(uint32_t i)
void wined3d_allocator_block_free(struct wined3d_allocator_block *block)
Definition: utils.c:7087
void resource_cleanup(struct wined3d_resource *resource)
Definition: resource.c:224
static struct wined3d_context * context_acquire(struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
void string_buffer_sprintf(struct wined3d_string_buffer *buffer, const char *format,...) PRINTF_ATTR(2
enum wined3d_shader_resource_type pixelshader_get_resource_type(const struct wined3d_shader_reg_maps *reg_maps, unsigned int resource_idx, DWORD tex_types)
Definition: shader.c:3153
void wined3d_device_context_emit_set_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view)
Definition: cs.c:1394
void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx)
Definition: texture.c:4381
void wined3d_buffer_copy_bo_address(struct wined3d_buffer *dst_buffer, struct wined3d_context *context, unsigned int dst_offset, const struct wined3d_const_bo_address *src_addr, unsigned int size)
Definition: buffer.c:785
struct wined3d_light_info * wined3d_light_state_get_light(const struct wined3d_light_state *state, unsigned int idx)
Definition: stateblock.c:687
void clipplane(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: ffp_gl.c:1002
static unsigned int wined3d_blend_state_get_writemask(const struct wined3d_blend_state *state, unsigned int index)
#define WINED3D_FORMAT_CAP_SRGB_READ
void wined3d_swapchain_state_restore_from_fullscreen(struct wined3d_swapchain_state *state, HWND window, const RECT *window_rect)
Definition: swapchain.c:2275
void wined3d_unregister_window(HWND window)
Definition: wined3d_main.c:790
HRESULT wined3d_shader_extract_from_dxbc(struct wined3d_shader *shader, unsigned int max_shader_version, enum vkd3d_shader_source_type *source_type)
Definition: shader_sm4.c:2085
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, uint32_t location)
Definition: texture.c:770
void wined3d_texture_load(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
Definition: texture.c:1657
wined3d_cs_queue_id
@ WINED3D_CS_QUEUE_MAP
@ WINED3D_CS_QUEUE_COUNT
@ WINED3D_CS_QUEUE_DEFAULT
static void wined3d_context_copy_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *dst, const struct wined3d_bo_address *src, unsigned int range_count, const struct wined3d_range *ranges, uint32_t map_flags)
enum wined3d_format_id pixelformat_for_depth(DWORD depth)
Definition: utils.c:6067
static unsigned int wined3d_bind_layer_count(const struct wined3d_texture *texture)
int BOOL string_buffer_resize(struct wined3d_string_buffer *buffer, int rc)
Definition: shader.c:435
static enum wined3d_material_color_source validate_material_colour_source(const struct wined3d_vertex_declaration *vdecl, enum wined3d_material_color_source source)
unsigned int shader_find_free_input_register(const struct wined3d_shader_reg_maps *reg_maps, unsigned int max)
Definition: shader.c:1863
wined3d_pci_device
@ CARD_NVIDIA_GEFORCE_GTX780
@ CARD_INTEL_I5100_4
@ CARD_INTEL_I5100_3
@ CARD_NVIDIA_GEFORCE_GTX950M
@ CARD_INTEL_946GZ
@ CARD_NVIDIA_GEFORCE_RTX4060
@ CARD_NVIDIA_GEFORCE_GTX1060_3GB
@ CARD_NVIDIA_GEFORCE_GT325M
@ CARD_NVIDIA_GEFORCE_GTXTITANZ
@ CARD_INTEL_HD5500
@ CARD_AMD_RADEON_HD4800
@ CARD_NVIDIA_GEFORCE_GTX775M
@ CARD_NVIDIA_GEFORCE_GTX570
@ CARD_NVIDIA_GEFORCE_GTXTITAN
@ CARD_NVIDIA_GEFORCE_RTX3080_10GB_LHR
@ CARD_NVIDIA_GEFORCE_GTX560TI
@ CARD_NVIDIA_GEFORCE_GTX1080TI
@ CARD_INTEL_855GM
@ CARD_NVIDIA_GEFORCE_GTS250
@ CARD_AMD_RADEON_HD6400
@ CARD_AMD_RADEON_HD4700
@ CARD_INTEL_IP5200_2
@ CARD_NVIDIA_GEFORCE_6800
@ CARD_AMD_RADEON_HD5700
@ CARD_NVIDIA_GEFORCE_GT610
@ CARD_NVIDIA_GEFORCE_GT420
@ CARD_NVIDIA_GEFORCEFX_5600
@ CARD_AMD_RADEON_R9_M370X
@ CARD_INTEL_945G
@ CARD_INTEL_HWD
@ CARD_NVIDIA_GEFORCE_GTX1080
@ CARD_INTEL_945GME
@ CARD_AMD_RADEON_RX_460
@ CARD_NVIDIA_GEFORCE_9600GT
@ CARD_NVIDIA_GEFORCE_GT640M
@ CARD_AMD_RADEON_HD7800
@ CARD_NVIDIA_GEFORCE_GTX1650SUPER
@ CARD_AMD_RADEON_RX_VEGA_20
@ CARD_INTEL_HD615
@ CARD_NVIDIA_GEFORCE_GT1030
@ CARD_NVIDIA_GEFORCE_940M
@ CARD_INTEL_915G
@ CARD_NVIDIA_GEFORCE_320M
@ CARD_AMD_RADEON_R9_290X
@ CARD_INTEL_G41
@ CARD_NVIDIA_GEFORCE_GT650M
@ CARD_NVIDIA_GEFORCE_GTX460
@ CARD_AMD_RADEON_RX_NAVI_21
@ CARD_INTEL_IP555
@ CARD_NVIDIA_GEFORCE_830M
@ CARD_AMD_RADEON_RX_VEGA_10
@ CARD_AMD_RADEON_HD2900
@ CARD_NVIDIA_RIVA_128
@ CARD_INTEL_I555
@ CARD_NVIDIA_GEFORCE_7300
@ CARD_NVIDIA_GEFORCEFX_5200
@ CARD_NVIDIA_GEFORCE_GTX1650
@ CARD_NVIDIA_GEFORCE_GT330
@ CARD_NVIDIA_GEFORCE_7600
@ CARD_INTEL_IPP6300
@ CARD_NVIDIA_GEFORCE_GT320M
@ CARD_INTEL_PNVG
@ CARD_WINE
@ CARD_NVIDIA_GEFORCE_820M
@ CARD_NVIDIA_GEFORCE_GTX280
@ CARD_NVIDIA_GEFORCE_6600GT
@ CARD_NVIDIA_GEFORCE_GT425M
@ CARD_NVIDIA_GEFORCE_GTX275
@ CARD_AMD_RADEON_XPRESS_200M
@ CARD_NVIDIA_GEFORCE_GT440
@ CARD_NVIDIA_GEFORCE_7400
@ CARD_AMD_RADEON_HD5600
@ CARD_NVIDIA_GEFORCE_GTX560
@ CARD_INTEL_IVBD
@ CARD_NVIDIA_GEFORCE_GTX650TI
@ CARD_INTEL_SNBS
@ CARD_NVIDIA_GEFORCE_845M
@ CARD_AMD_RADEON_HD5400
@ CARD_NVIDIA_GEFORCE_RTX3080_10GB
@ CARD_NVIDIA_GEFORCE_840M
@ CARD_INTEL_915GM
@ CARD_AMD_RADEON_X1600
@ CARD_INTEL_945GM
@ CARD_NVIDIA_GEFORCE_8800GTX
@ CARD_NVIDIA_GEFORCE_9700MGT
@ CARD_INTEL_965Q
@ CARD_INTEL_965G
@ CARD_NVIDIA_GEFORCE_GT730
@ CARD_INTEL_PNVM
@ CARD_NVIDIA_GEFORCE_GTX580
@ CARD_NVIDIA_GEFORCE_GTX1060
@ CARD_INTEL_IVBM
@ CARD_NVIDIA_GEFORCE_GTX1070
@ CARD_NVIDIA_GEFORCE_GTX950
@ CARD_INTEL_HD5000_2
@ CARD_NVIDIA_GEFORCE_RTX3090
@ CARD_NVIDIA_GEFORCE_RTX3060TI_GA104_LHR
@ CARD_INTEL_UHD630_1
@ CARD_NVIDIA_GEFORCE_GTX690
@ CARD_NVIDIA_GEFORCE_GTX780TI
@ CARD_NVIDIA_GEFORCE_RTX3050
@ CARD_AMD_RADEON_RX_VEGA_12
@ CARD_NVIDIA_GEFORCE_RTX3060TI_GA104
@ CARD_NVIDIA_GEFORCE_GTX770
@ CARD_NVIDIA_GEFORCE_RTX3090TI
@ CARD_NVIDIA_GEFORCE_GTX760
@ CARD_NVIDIA_GEFORCE_GTX880M
@ CARD_NVIDIA_GEFORCE4_TI4200
@ CARD_INTEL_UHD617
@ CARD_AMD_RADEON_HD4200M
@ CARD_INTEL_HD6000
@ CARD_INTEL_UHD620
@ CARD_NVIDIA_GEFORCE_GT430
@ CARD_NVIDIA_RIVA_TNT
@ CARD_NVIDIA_GEFORCE_GTX750TI
@ CARD_INTEL_I5100_2
@ CARD_INTEL_I540
@ CARD_NVIDIA_GEFORCE_8300GS
@ CARD_NVIDIA_GEFORCE_RTX4090
@ CARD_NVIDIA_GEFORCE_GTX465
@ CARD_INTEL_E7221G
@ CARD_INTEL_965GME
@ CARD_INTEL_IP580_2
@ CARD_AMD_RADEON_HD2600
@ CARD_INTEL_IP6200
@ CARD_NVIDIA_GEFORCE_RTX4070TI
@ CARD_NVIDIA_GEFORCE_GT240
@ CARD_NVIDIA_TITANX_PASCAL
@ CARD_AMD_RAPHAEL
@ CARD_AMD_RADEON_R9_M380
@ CARD_AMD_RADEON_HD6550D
@ CARD_AMD_RADEON_HD4600
@ CARD_INTEL_HD520_1
@ CARD_NVIDIA_GEFORCE_GT520
@ CARD_AMD_RADEON_RAVEN
@ CARD_INTEL_G33
@ CARD_NVIDIA_GEFORCE_RTX2080
@ CARD_AMD_RADEON_PRO_V620_VF
@ CARD_INTEL_HD5600
@ CARD_NVIDIA_GEFORCE_GTX675MX_1
@ CARD_NVIDIA_GEFORCE_GT730M
@ CARD_AMD_RADEON_RX_NAVI_14
@ CARD_NVIDIA_GEFORCE_8800GTS
@ CARD_NVIDIA_GEFORCE_RTX4070TISUPER
@ CARD_NVIDIA_GEFORCE_GT640
@ CARD_AMD_RADEON_HD6800
@ CARD_AMD_RADEON_HD3200
@ CARD_NVIDIA_GEFORCE_8400GS
@ CARD_INTEL_IP5200_6
@ CARD_NVIDIA_GEFORCE_RTX3070TI
@ CARD_AMD_RAGE_128PRO
@ CARD_NVIDIA_GEFORCE_8200
@ CARD_VMWARE_SVGA3D
@ CARD_AMD_RADEON_HD6600M
@ CARD_AMD_RADEON_HD7900
@ CARD_INTEL_845G
@ CARD_INTEL_HD510_2
@ CARD_NVIDIA_GEFORCE_RTX3080TI
@ CARD_NVIDIA_GEFORCE_GTX1660TI
@ CARD_NVIDIA_GEFORCE_RTX3070_MOBILE
@ CARD_AMD_RADEON_HD3850
@ CARD_AMD_RADEON_HD6600
@ CARD_INTEL_I5100_1
@ CARD_INTEL_ILKD
@ CARD_NVIDIA_GEFORCE_GTX480
@ CARD_INTEL_HD515
@ CARD_NVIDIA_GEFORCE_RTX4070SUPER
@ CARD_NVIDIA_GEFORCE_GT720
@ CARD_NVIDIA_GEFORCE_GTX550
@ CARD_NVIDIA_GEFORCE_9400M
@ CARD_NVIDIA_GEFORCE_GTX960
@ CARD_NVIDIA_GEFORCE_GT755M
@ CARD_REDHAT_VIRGL
@ CARD_AMD_RADEON_9500
@ CARD_NVIDIA_GEFORCE_GTX680
@ CARD_INTEL_Q45
@ CARD_AMD_RADEON_HD8670
@ CARD_NVIDIA_GEFORCE2
@ CARD_AMD_RADEON_HD7870
@ CARD_NVIDIA_GEFORCE_8600MGT
@ CARD_INTEL_Q33
@ CARD_NVIDIA_GEFORCE_GTX650
@ CARD_NVIDIA_GEFORCE_GT555M
@ CARD_NVIDIA_GEFORCE_GTS350M
@ CARD_NVIDIA_GEFORCE_RTX3080_12GB
@ CARD_AMD_RADEON_HD7660D
@ CARD_NVIDIA_GEFORCE_GTX870M
@ CARD_NVIDIA_GEFORCE_9400GT
@ CARD_NVIDIA_GEFORCE_GTX850M
@ CARD_NVIDIA_GEFORCE_RTX3060
@ CARD_NVIDIA_GEFORCE_7800GT
@ CARD_INTEL_Q35
@ CARD_AMD_RADEON_R9_M395X
@ CARD_NVIDIA_GEFORCE
@ CARD_NVIDIA_GEFORCE_RTX3060TI_GA103
@ CARD_NVIDIA_GEFORCE_GTX670
@ CARD_AMD_RADEON_R9_290
@ CARD_NVIDIA_GEFORCE_GTX765M
@ CARD_AMD_RADEON_HD5900
@ CARD_NVIDIA_TITANV
@ CARD_NVIDIA_GEFORCE_RTX4080SUPER
@ CARD_NVIDIA_GEFORCE_GTX1080M
@ CARD_INTEL_G45
@ CARD_AMD_RADEON_R9_FURY
@ CARD_INTEL_IVBS
@ CARD_NVIDIA_GEFORCE_RTX4060TI16G
@ CARD_INTEL_865G
@ CARD_INTEL_IP5200_5
@ CARD_NVIDIA_GEFORCE_RTX4070
@ CARD_NVIDIA_GEFORCE_RTX3060_LHR
@ CARD_NVIDIA_GEFORCE_210
@ CARD_INTEL_IPP580_1
@ CARD_NVIDIA_GEFORCE_GTX660M
@ CARD_INTEL_HD510_3
@ CARD_NVIDIA_GEFORCE_GTX460M
@ CARD_AMD_RADEON_HD6700
@ CARD_NVIDIA_GEFORCE_9800GT
@ CARD_INTEL_IGD
@ CARD_INTEL_965GM
@ CARD_AMD_RADEON_X700
@ CARD_AMD_RADEON_7200
@ CARD_AMD_RADEON_HD6900
@ CARD_INTEL_I6100
@ CARD_NVIDIA_GEFORCE_6200
@ CARD_INTEL_I550
@ CARD_INTEL_IP580_1
@ CARD_INTEL_SNBD
@ CARD_AMD_RADEON_R7
@ CARD_AMD_RADEON_8500
@ CARD_INTEL_IP5200_1
@ CARD_NVIDIA_GEFORCE_9300
@ CARD_NVIDIA_GEFORCE_GT525M
@ CARD_NVIDIA_GEFORCE_GTX760TI
@ CARD_NVIDIA_AMPERE_A10
@ CARD_INTEL_GM45
@ CARD_NVIDIA_GEFORCE_GTX1060M
@ CARD_INTEL_UHD630_2
@ CARD_NVIDIA_GEFORCE_GTX260
@ CARD_NVIDIA_GEFORCE_GTX980
@ CARD_NVIDIA_GEFORCE_8600GT
@ CARD_NVIDIA_GEFORCE_GTX970M
@ CARD_NVIDIA_GEFORCE_GTX560M
@ CARD_NVIDIA_GEFORCE_GTX1070M
@ CARD_NVIDIA_GEFORCE_315M
@ CARD_NVIDIA_GEFORCE_RTX2070
@ CARD_NVIDIA_GEFORCE_GT630
@ CARD_NVIDIA_GEFORCE_GT220
@ CARD_AMD_RADEON_HD7700
@ CARD_NVIDIA_GEFORCE_GTX750
@ CARD_INTEL_HDP530
@ CARD_NVIDIA_RIVA_TNT2
@ CARD_NVIDIA_GEFORCE_GTX770M
@ CARD_NVIDIA_GEFORCE_GTXTITANX
@ CARD_NVIDIA_GEFORCE_GTX1660SUPER
@ CARD_AMD_RADEON_RX_NAVI_10
@ CARD_NVIDIA_GEFORCE_GTX675MX_2
@ CARD_AMD_RADEON_HD5800
@ CARD_AMD_RADEON_PRO_V620
@ CARD_INTEL_HD530_2
@ CARD_NVIDIA_GEFORCEFX_5800
@ CARD_AMD_RADEON_HD2350
@ CARD_AMD_RADEON_R9_285
@ CARD_NVIDIA_GEFORCE_GTX1050
@ CARD_AMD_RADEON_HD8600M
@ CARD_NVIDIA_GEFORCE3
@ CARD_INTEL_HD630_2
@ CARD_NVIDIA_GEFORCE_RTX4060TI8G
@ CARD_INTEL_HD520_2
@ CARD_NVIDIA_GEFORCE_GTXTITANB
@ CARD_INTEL_HD630_1
@ CARD_NVIDIA_GEFORCE4_MX
@ CARD_NVIDIA_TESLA_T4
@ CARD_NVIDIA_GEFORCE_GTX780M
@ CARD_NVIDIA_GEFORCE_GTX960M
@ CARD_AMD_RADEON_R3
@ CARD_NVIDIA_GEFORCE_GTX1050TI
@ CARD_NVIDIA_GEFORCE_GTX970
@ CARD_AMD_RADEON_HD6300
@ CARD_NVIDIA_GEFORCE_GT630M
@ CARD_INTEL_SNBM
@ CARD_NVIDIA_GEFORCE_GT740M
@ CARD_AMD_RADEON_HD8770
@ CARD_INTEL_HD510_1
@ CARD_INTEL_830M
@ CARD_NVIDIA_GEFORCE_GT540M
@ CARD_NVIDIA_GEFORCE_GTX660
@ CARD_NVIDIA_GEFORCE_RTX4080
@ CARD_AMD_RADEON_HD6490M
@ CARD_INTEL_IPP580_2
@ CARD_INTEL_IP5200_4
@ CARD_AMD_RADEON_RX_480
@ CARD_NVIDIA_GEFORCE_RTX3070
@ CARD_INTEL_HD530_1
@ CARD_INTEL_IP5200_3
@ CARD_INTEL_HD5300
@ CARD_INTEL_HD620
@ CARD_NVIDIA_GEFORCE2_MX
@ CARD_INTEL_ILKM
@ CARD_NVIDIA_GEFORCE_RTX2060
@ CARD_NVIDIA_GEFORCE_GTX470
@ CARD_NVIDIA_GEFORCE_RTX2080TI
@ CARD_NVIDIA_GEFORCE_8500GT
@ CARD_NVIDIA_GEFORCE_GTX980TI
@ CARD_NVIDIA_GEFORCE_410M
@ CARD_AMD_VANGOGH
@ CARD_NVIDIA_GEFORCE_GTS450
@ CARD_NVIDIA_GEFORCE_GT750M
@ CARD_AMD_RADEON_HD6480G
@ CARD_NVIDIA_GEFORCE_RTX3070_LHR
@ CARD_NVIDIA_GEFORCE_GTX660TI
@ CARD_INTEL_HWM
@ CARD_NVIDIA_GEFORCE_9500GT
@ CARD_NVIDIA_GEFORCE_GTX670MX
@ CARD_NVIDIA_GEFORCE_GTX860M
@ CARD_AMD_RADEON_HD4350
@ CARD_INTEL_B43
@ CARD_NVIDIA_GEFORCE_9200
@ CARD_INTEL_HD5000_1
@ CARD_AMD_RADEON_HD6410D
void wined3d_unordered_access_view_set_counter(struct wined3d_unordered_access_view *view, unsigned int value)
Definition: view.c:1714
static unsigned int wined3d_bitmap_ffs_xor(const uint32_t *bitmap, unsigned int bit_count, unsigned int start, uint32_t xor_mask)
struct wined3d_cs * wined3d_cs_create(struct wined3d_device *device, const enum wined3d_feature_level *levels, unsigned int level_count)
Definition: cs.c:3561
static float wined3d_get_float_state(const struct wined3d_state *state, enum wined3d_render_state rs)
void wined3d_texture_get_bo_address(const struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_bo_address *data, uint32_t location)
Definition: texture.c:727
wined3d_projection_type
@ WINED3D_PROJECTION_COUNT3
@ WINED3D_PROJECTION_NONE
@ WINED3D_PROJECTION_COUNT4
void context_restore(struct wined3d_context *context, struct wined3d_texture *texture, unsigned int sub_resource_idx)
Definition: context.c:55
HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
Definition: cs.c:2488
const char * debug_color(const struct wined3d_color *color)
Definition: utils.c:4561
BOOL wined3d_resource_prepare_sysmem(struct wined3d_resource *resource)
Definition: resource.c:337
const struct wined3d_vec4 wined3d_srgb_const[]
Definition: shader.c:32
void wined3d_ffp_get_vs_settings(const struct wined3d_state *state, const struct wined3d_stream_info *si, const struct wined3d_d3d_info *d3d_info, struct wined3d_ffp_vs_settings *settings)
Definition: utils.c:6444
static unsigned int wined3d_popcount(unsigned int x)
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)
wined3d_blit_op
@ WINED3D_BLIT_OP_COLOR_BLIT_CKEY
@ WINED3D_BLIT_OP_RAW_BLIT
@ WINED3D_BLIT_OP_COLOR_BLIT_ALPHATEST
@ WINED3D_BLIT_OP_DEPTH_BLIT
@ WINED3D_BLIT_OP_COLOR_BLIT
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
Definition: cs.c:1768
int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry)
Definition: utils.c:6579
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, uint32_t location)
wined3d_shader_conditional_op
@ WINED3D_SHADER_CONDITIONAL_OP_NZ
@ WINED3D_SHADER_CONDITIONAL_OP_Z
HRESULT wined3d_init(struct wined3d *wined3d, uint32_t flags)
Definition: directx.c:3477
HRESULT compile_state_table(struct wined3d_state_entry *state_table, APPLYSTATEFUNC **dev_multistate_funcs, const struct wined3d_d3d_info *d3d_info, const BOOL *supported_extensions, const struct wined3d_vertex_pipe_ops *vertex, const struct wined3d_fragment_pipe_ops *fragment, const struct wined3d_state_entry_template *misc)
Definition: ffp_gl.c:1666
void wined3d_resource_update_draw_binding(struct wined3d_resource *resource)
Definition: resource.c:425
void dump_color_fixup_desc(struct color_fixup_desc fixup)
Definition: utils.c:5540
void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
Definition: context.c:160
void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
Definition: cs.c:1296
void wined3d_device_context_emit_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
Definition: cs.c:1737
void state_shademode(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
Definition: ffp_gl.c:99
void wined3d_device_context_emit_execute_command_list(struct wined3d_device_context *context, struct wined3d_command_list *list, bool restore_state)
Definition: cs.c:2994
enum wined3d_pci_device wined3d_gpu_from_feature_level(enum wined3d_pci_vendor *vendor, enum wined3d_feature_level feature_level)
Definition: directx.c:930
HRESULT shader_generate_code(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer, const struct wined3d_shader_reg_maps *reg_maps, void *backend_ctx, const DWORD *start, const DWORD *end)
Definition: shader.c:1873
void wined3d_device_create_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
Definition: device.c:737
static unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture, unsigned int level)
void resource_unload(struct wined3d_resource *resource)
Definition: resource.c:241
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate)
Definition: swapchain.c:1826
static const uint32_t WINED3D_READ_ONLY_BIND_MASK
void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, WORD flags, const struct wined3d_color_key *color_key)
Definition: cs.c:2037
#define RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO
Definition: winnt_old.h:1156
static unsigned int block
Definition: xmlmemory.c:101
unsigned char BYTE
Definition: xxhash.c:193
#define const
Definition: zconf.h:233