36#define WINED3D_FORMAT_FOURCC_BASE (WINED3DFMT_BC7_UNORM_SRGB + 1)
70#define WINED3D_FORMAT_COUNT (WINED3D_FORMAT_FOURCC_BASE + ARRAY_SIZE(format_index_remap))
85 {
WINED3DFMT_UNKNOWN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
87 {
WINED3DFMT_UYVY, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
88 {
WINED3DFMT_YUY2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
89 {
WINED3DFMT_YV12, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
90 {
WINED3DFMT_NV12, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
91 {
WINED3DFMT_DXT1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
92 {
WINED3DFMT_DXT2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
93 {
WINED3DFMT_DXT3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
94 {
WINED3DFMT_DXT4, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
95 {
WINED3DFMT_DXT5, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
96 {
WINED3DFMT_MULTI2_ARGB8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
97 {
WINED3DFMT_G8R8_G8B8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
98 {
WINED3DFMT_R8G8_B8G8, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
100 {
WINED3DFMT_R8G8_SNORM_Cx, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
101 {
WINED3DFMT_R11G11B10_FLOAT, 11, 11, 10, 0, 0, 11, 22, 0, 4, 0, 0},
103 {
WINED3DFMT_P8_UINT_A8_UNORM, 0, 0, 0, 8, 0, 0, 0, 8, 2, 0, 0},
104 {
WINED3DFMT_P8_UINT, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
106 {
WINED3DFMT_B8G8R8_UNORM, 8, 8, 8, 0, 16, 8, 0, 0, 3, 0, 0},
107 {
WINED3DFMT_B5G6R5_UNORM, 5, 6, 5, 0, 11, 5, 0, 0, 2, 0, 0},
108 {
WINED3DFMT_B5G5R5X1_UNORM, 5, 5, 5, 0, 10, 5, 0, 0, 2, 0, 0},
109 {
WINED3DFMT_B5G5R5A1_UNORM, 5, 5, 5, 1, 10, 5, 0, 15, 2, 0, 0},
110 {
WINED3DFMT_B4G4R4A4_UNORM, 4, 4, 4, 4, 8, 4, 0, 12, 2, 0, 0},
111 {
WINED3DFMT_B2G3R3_UNORM, 3, 3, 2, 0, 5, 2, 0, 0, 1, 0, 0},
112 {
WINED3DFMT_A8_UNORM, 0, 0, 0, 8, 0, 0, 0, 0, 1, 0, 0},
113 {
WINED3DFMT_B2G3R3A8_UNORM, 3, 3, 2, 8, 5, 2, 0, 8, 2, 0, 0},
114 {
WINED3DFMT_B4G4R4X4_UNORM, 4, 4, 4, 0, 8, 4, 0, 0, 2, 0, 0},
115 {
WINED3DFMT_R8G8B8X8_UNORM, 8, 8, 8, 0, 0, 8, 16, 0, 4, 0, 0},
116 {
WINED3DFMT_B10G10R10A2_UNORM, 10, 10, 10, 2, 20, 10, 0, 30, 4, 0, 0},
118 {
WINED3DFMT_L8_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
119 {
WINED3DFMT_L8A8_UNORM, 0, 0, 0, 8, 0, 0, 0, 8, 2, 0, 0},
120 {
WINED3DFMT_L4A4_UNORM, 0, 0, 0, 4, 0, 0, 0, 4, 1, 0, 0},
121 {
WINED3DFMT_L16_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
123 {
WINED3DFMT_R5G5_SNORM_L6_UNORM, 5, 5, 0, 0, 0, 5, 0, 0, 2, 0, 0},
124 {
WINED3DFMT_R8G8_SNORM_L8X8_UNORM, 8, 8, 0, 0, 0, 8, 0, 0, 4, 0, 0},
125 {
WINED3DFMT_R8G8B8A8_SNORM, 8, 8, 8, 8, 0, 8, 16, 24, 4, 0, 0},
126 {
WINED3DFMT_R10G11B11_SNORM, 10, 11, 11, 0, 0, 10, 21, 0, 4, 0, 0},
127 {
WINED3DFMT_R10G10B10X2_UINT, 10, 10, 10, 0, 0, 10, 20, 0, 4, 0, 0},
128 {
WINED3DFMT_R10G10B10X2_SNORM, 10, 10, 10, 0, 0, 10, 20, 0, 4, 0, 0},
129 {
WINED3DFMT_R10G10B10_SNORM_A2_UNORM, 10, 10, 10, 2, 0, 10, 20, 30, 4, 0, 0},
131 {
WINED3DFMT_D16_LOCKABLE, 0, 0, 0, 0, 0, 0, 0, 0, 2, 16, 0},
132 {
WINED3DFMT_D32_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 4, 32, 0},
133 {
WINED3DFMT_S1_UINT_D15_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 2, 15, 1},
134 {
WINED3DFMT_X8D24_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 0},
135 {
WINED3DFMT_S4X4_UINT_D24_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 4},
136 {
WINED3DFMT_D16_UNORM, 0, 0, 0, 0, 0, 0, 0, 0, 2, 16, 0},
137 {
WINED3DFMT_D32_FLOAT, 0, 0, 0, 0, 0, 0, 0, 0, 4, 32, 0},
138 {
WINED3DFMT_S8_UINT_D24_FLOAT, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 8},
140 {
WINED3DFMT_ATI1N, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
141 {
WINED3DFMT_ATI2N, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
142 {
WINED3DFMT_NVDB, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
143 {
WINED3DFMT_INST, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
144 {
WINED3DFMT_INTZ, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 8},
145 {
WINED3DFMT_RESZ, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
146 {
WINED3DFMT_NVHU, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
147 {
WINED3DFMT_NVHS, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
148 {
WINED3DFMT_NULL, 8, 8, 8, 8, 0, 8, 16, 24, 4, 0, 0},
150 {
WINED3DFMT_R16, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
151 {
WINED3DFMT_AL16, 0, 0, 0, 16, 0, 0, 0, 16, 4, 0, 0},
153 {
WINED3DFMT_R9G9B9E5_SHAREDEXP, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0},
155 {
WINED3DFMT_R32G32B32A32_TYPELESS, 32, 32, 32, 32, 0, 32, 64, 96, 16, 0, 0},
156 {
WINED3DFMT_R32G32B32_TYPELESS, 32, 32, 32, 0, 0, 32, 64, 0, 12, 0, 0},
157 {
WINED3DFMT_R16G16B16A16_TYPELESS, 16, 16, 16, 16, 0, 16, 32, 48, 8, 0, 0},
158 {
WINED3DFMT_R32G32_TYPELESS, 32, 32, 0, 0, 0, 32, 0, 0, 8, 0, 0},
159 {
WINED3DFMT_R32G8X24_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 8, 32, 8},
160 {
WINED3DFMT_R10G10B10A2_TYPELESS, 10, 10, 10, 2, 0, 10, 20, 30, 4, 0, 0},
161 {
WINED3DFMT_R8G8B8A8_TYPELESS, 8, 8, 8, 8, 0, 8, 16, 24, 4, 0, 0},
162 {
WINED3DFMT_R16G16_TYPELESS, 16, 16, 0, 0, 0, 16, 0, 0, 4, 0, 0},
163 {
WINED3DFMT_R32_TYPELESS, 32, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0},
164 {
WINED3DFMT_R24G8_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 4, 24, 8},
165 {
WINED3DFMT_R8G8_TYPELESS, 8, 8, 0, 0, 0, 8, 0, 0, 2, 0, 0},
166 {
WINED3DFMT_R16_TYPELESS, 16, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0},
167 {
WINED3DFMT_R8_TYPELESS, 8, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
168 {
WINED3DFMT_BC1_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
169 {
WINED3DFMT_BC2_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
170 {
WINED3DFMT_BC3_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
171 {
WINED3DFMT_BC4_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
172 {
WINED3DFMT_BC5_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
173 {
WINED3DFMT_BC6H_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
174 {
WINED3DFMT_BC7_TYPELESS, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0},
175 {
WINED3DFMT_B8G8R8A8_TYPELESS, 8, 8, 8, 8, 16, 8, 0, 24, 4, 0, 0},
176 {
WINED3DFMT_B8G8R8X8_TYPELESS, 8, 8, 8, 0, 16, 8, 0, 0, 4, 0, 0},
438 unsigned int dst_row_pitch,
unsigned int dst_slice_pitch,
441 unsigned int dst_row_pitch,
unsigned int dst_slice_pitch,
452 unsigned int x,
y,
z;
453 const unsigned char *
Source;
460 Source =
src +
z * src_slice_pitch +
y * src_row_pitch;
461 Dest =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
465 Dest[1] = (
color & 0xf0u) << 0;
466 Dest[0] = (
color & 0x0fu) << 4;
476 unsigned int x,
y,
z;
477 unsigned char r_in,
g_in, l_in;
478 const unsigned short *texel_in;
479 unsigned short *texel_out;
489 texel_out = (
unsigned short *) (
dst +
z * dst_slice_pitch +
y * dst_row_pitch);
490 texel_in = (
const unsigned short *)(
src +
z * src_slice_pitch +
y * src_row_pitch);
493 l_in = (*texel_in & 0xfc00u) >> 10;
494 g_in = (*texel_in & 0x03e0u) >> 5;
495 r_in = *texel_in & 0x001fu;
497 *texel_out = ((r_in + 16) << 11) | (l_in << 5) | (
g_in + 16);
508 unsigned int x,
y,
z;
509 unsigned char *texel_out, r_out,
g_out, r_in,
g_in, l_in;
510 const unsigned short *texel_in;
516 texel_in = (
const unsigned short *)(
src +
z * src_slice_pitch +
y * src_row_pitch);
517 texel_out =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
520 l_in = (*texel_in & 0xfc00u) >> 10;
521 g_in = (*texel_in & 0x03e0u) >> 5;
522 r_in = *texel_in & 0x001fu;
532 texel_out[0] = r_out;
533 texel_out[1] =
g_out;
534 texel_out[2] = l_in << 1 | l_in >> 5;
547 unsigned int x,
y,
z;
548 unsigned char *texel_out, ds_out, dt_out, r_in,
g_in, l_in;
549 const unsigned short *texel_in;
563 texel_in = (
const unsigned short *)(
src +
z * src_slice_pitch +
y * src_row_pitch);
564 texel_out =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
567 l_in = (*texel_in & 0xfc00u) >> 10;
568 g_in = (*texel_in & 0x03e0u) >> 5;
569 r_in = *texel_in & 0x001fu;
579 texel_out[0] = ds_out;
580 texel_out[1] = dt_out;
581 texel_out[2] = l_in << 1 | l_in >> 5;
593 unsigned int x,
y,
z;
601 Source = (
const short *)(
src +
z * src_slice_pitch +
y * src_row_pitch);
602 Dest =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
607 Dest[1] = (
color >> 8) + 128;
608 Dest[2] = (
color & 0xff) + 128;
618 unsigned int x,
y,
z;
631 Dest =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
635 Dest[0] = ((
color >> 16) & 0xff);
636 Dest[1] = ((
color >> 8 ) & 0xff) + 128;
637 Dest[2] = (
color & 0xff) + 128;
647 unsigned int x,
y,
z;
659 Dest =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
663 Dest[2] = ((
color >> 16) & 0xff);
664 Dest[1] = ((
color >> 8 ) & 0xff);
665 Dest[0] = (
color & 0xff);
676 unsigned int x,
y,
z;
685 Dest =
dst +
z * dst_slice_pitch +
y * dst_row_pitch;
689 Dest[0] = ((
color >> 16) & 0xff) + 128;
690 Dest[1] = ((
color >> 8 ) & 0xff) + 128;
691 Dest[2] = (
color & 0xff) + 128;
692 Dest[3] = ((
color >> 24) & 0xff) + 128;
702 unsigned int x,
y,
z;
704 unsigned short *Dest;
711 Dest = (
unsigned short *) (
dst +
z * dst_slice_pitch +
y * dst_row_pitch);
716 Dest[1] = (
color >> 16) + 32768;
717 Dest[2] = (
color & 0xffff) + 32768;
727 unsigned int x,
y,
z;
735 Source = (
const WORD *)(
src +
z * src_slice_pitch +
y * src_row_pitch);
736 Dest = (
WORD *) (
dst +
z * dst_slice_pitch +
y * dst_row_pitch);
755 unsigned int x,
y,
z;
763 Source = (
const float *)(
src +
z * src_slice_pitch +
y * src_row_pitch);
764 Dest = (
float *) (
dst +
z * dst_slice_pitch +
y * dst_row_pitch);
781 unsigned int x,
y,
z;
796 DWORD d24 = (d15 << 9) + (d15 >> 6);
806 unsigned int x,
y,
z;
827 unsigned int x,
y,
z;
834 float *dest_f = (
float *)(
dst +
z * dst_slice_pitch +
y * dst_row_pitch);
840 dest_s[
x * 2 + 1] =
source[
x] & 0xff;
847 unsigned int src_row_pitch,
unsigned int src_slice_pitch,
848 unsigned int dst_row_pitch,
unsigned int dst_slice_pitch,
851 unsigned int x,
y,
z;
869 unsigned int src_row_pitch,
unsigned int src_slice_pitch,
870 unsigned int dst_row_pitch,
unsigned int dst_slice_pitch,
873 unsigned int x,
y,
z;
909 FIXME(
"P8 surface loaded without a palette.\n");
921 src_row = &
src[src_pitch *
y];
925 BYTE src_color = src_row[
x];
926 dst_row[
x] = 0xff000000
927 | (
palette->colors[src_color].rgbRed << 16)
928 | (
palette->colors[src_color].rgbGreen << 8)
929 |
palette->colors[src_color].rgbBlue;
944 src_row = (
WORD *)&
src[src_pitch *
y];
945 dst_row = (
WORD *)&
dst[dst_pitch *
y];
948 WORD src_color = src_row[
x];
950 dst_row[
x] = 0x8000u | ((src_color & 0xffc0u) >> 1) | (src_color & 0x1fu);
952 dst_row[
x] = ((src_color & 0xffc0u) >> 1) | (src_color & 0x1fu);
967 src_row = (
WORD *)&
src[src_pitch *
y];
968 dst_row = (
WORD *)&
dst[dst_pitch *
y];
971 WORD src_color = src_row[
x];
973 dst_row[
x] = src_color & ~0x8000;
975 dst_row[
x] = src_color | 0x8000;
990 src_row = &
src[src_pitch *
y];
994 DWORD src_color = (src_row[
x * 3 + 2] << 16) | (src_row[
x * 3 + 1] << 8) | src_row[
x * 3];
996 dst_row[
x] = src_color | 0xff000000;
1005 const DWORD *src_row;
1015 DWORD src_color = src_row[
x];
1017 dst_row[
x] = src_color & ~0xff000000;
1019 dst_row[
x] = src_color | 0xff000000;
1028 const DWORD *src_row;
1038 DWORD src_color = src_row[
x];
1040 src_color &= ~0xff000000;
1041 dst_row[
x] = src_color;
1074 if (color_key_info[
i].src_format ==
format->id)
1075 return &color_key_info[
i].conversion;
1777 return &gl_info->
formats[fmt_idx];
1824 ERR(
"Invalid channel type '%c'.\n",
t);
1838 ERR(
"Failed to allocate memory.\n");
1860 format->block_height = 1;
1890 format->typeless_id = typeless_format->
id;
1975 ERR(
"Unexpected GL resource type %u.\n",
type);
1989 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &
object);
1993 gl_info->
fbo_ops.glDeleteRenderbuffers(1, &
object);
2012 gl_info->
gl_ops.gl.p_glGenTextures(1,
object);
2027 gl_info->
gl_ops.gl.p_glGenTextures(1,
object);
2042 gl_info->
gl_ops.gl.p_glGenTextures(1,
object);
2056 gl_info->
gl_ops.gl.p_glGenTextures(1,
object);
2081 gl_info->
fbo_ops.glGenRenderbuffers(1,
object);
2101 while (gl_info->
gl_ops.gl.p_glGetError());
2110 {-1.0f, -1.0f, 0.0f},
2111 { 1.0f, -1.0f, 0.0f},
2112 {-1.0f, 1.0f, 0.0f},
2113 { 1.0f, 1.0f, 0.0f},
2115 static const char vs_core_header[] =
2119 "out vec4 out_color;\n"
2121 static const char vs_legacy_header[] =
2123 "attribute vec4 pos;\n"
2124 "attribute vec4 color;\n"
2125 "varying vec4 out_color;\n"
2127 static const char vs_body[] =
2130 " gl_Position = pos;\n"
2131 " out_color = color;\n"
2133 static const char fs_core[] =
2135 "in vec4 out_color;\n"
2136 "out vec4 fragment_color;\n"
2140 " fragment_color = out_color;\n"
2142 static const char fs_legacy[] =
2144 "varying vec4 out_color;\n"
2148 " gl_FragData[0] = out_color;\n"
2155 geometry = default_geometry;
2162 gl_info->
gl_ops.gl.p_glLoadIdentity();
2164 gl_info->
gl_ops.gl.p_glLoadIdentity();
2168 for (
i = 0;
i < 4; ++
i)
2169 gl_info->
gl_ops.gl.p_glVertex3fv(&geometry[
i].
x);
2170 gl_info->
gl_ops.gl.p_glEnd();
2184 if (!
ctx->test_program_id)
2198 source[0] = use_glsl_150 ? vs_core_header : vs_legacy_header;
2205 source[0] = use_glsl_150 ? fs_core : fs_legacy;
2210 GL_EXTCALL(glBindAttribLocation(
ctx->test_program_id, 0,
"pos"));
2211 GL_EXTCALL(glBindAttribLocation(
ctx->test_program_id, 1,
"color"));
2214 GL_EXTCALL(glBindFragDataLocation(
ctx->test_program_id, 0,
"fragment_color"));
2240 static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 1.0f};
2241 static const struct wined3d_color half_transparent_red = {1.0f, 0.0f, 0.0f, 0.5f};
2252 const char *type_string =
"color";
2262 gl_info->
fbo_ops.glGenRenderbuffers(1, &color_rb);
2271 checkGLcall(
"Create and attach color rb attachment");
2272 type_string =
"depth / stencil";
2280 TRACE(
"Format %s is supported as FBO %s attachment, type %u.\n",
2284 regular_fmt_used =
TRUE;
2292 WARN(
"Format %s with rendertarget flag is not supported as FBO color attachment (type %u),"
2294 format->flags[
type] &= ~WINED3DFMT_FLAG_RENDERTARGET;
2298 TRACE(
"Format %s is not supported as FBO %s attachment, type %u.\n",
2305 TRACE(
"Format %s is not supported as FBO %s attachment (type %u),"
2306 " trying rtInternal format as fallback.\n",
2309 while (gl_info->
gl_ops.gl.p_glGetError());
2320 TRACE(
"Format %s rtInternal format is supported as FBO %s attachment, type %u.\n",
2322 fallback_fmt_used =
TRUE;
2326 WARN(
"Format %s rtInternal format is not supported as FBO %s attachment, type %u.\n",
2328 format->flags[
type] &= ~WINED3DFMT_FLAG_RENDERTARGET;
2341 DWORD readback[16 * 16 * 16],
color, r_range, a_range;
2349 gl_info->
fbo_ops.glGenRenderbuffers(1, &rb);
2361 gl_info->
gl_ops.gl.p_glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
2365 while (gl_info->
gl_ops.gl.p_glGetError());
2366 TRACE(
"Format %s doesn't support post-pixelshader blending, type %u.\n",
2368 format->flags[
type] &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
2374 gl_info->
gl_ops.gl.p_glViewport(0, 0, 16, 1);
2376 gl_info->
gl_ops.gl.p_glViewport(0, 0, 16, 16);
2394 color = readback[7];
2404 color = readback[7 * 16 + 7];
2412 color = readback[7 * 16 + 7];
2416 gl_info->
gl_ops.gl.p_glReadPixels(0, 0, 16, 16,
2418 color = readback[7 * 16 + 7];
2429 r = (
color & 0x00ff0000u) >> 16;
2431 r_range =
format->red_size < 8 ? 1u << (8 -
format->red_size) : 1;
2432 a_range =
format->alpha_size < 8 ? 1u << (8 -
format->alpha_size) : 1;
2433 if (
format->red_size && (r < 0x7f - r_range || r > 0x7f + r_range))
2435 else if (
format->alpha_size > 1 && (a < 0xbf - a_range || a > 0xbf + a_range))
2439 TRACE(
"Format %s doesn't support post-pixelshader blending, type %u.\n",
2442 format->flags[
type] &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
2446 TRACE(
"Format %s supports post-pixelshader blending, type %u.\n",
2458 gl_info->
fbo_ops.glDeleteRenderbuffers(1, &rb);
2474 TRACE(
"Format %s's sRGB format is FBO attachable, type %u.\n",
2482 WARN(
"Format %s's sRGB format is not FBO attachable, type %u.\n",
2493 gl_info->
fbo_ops.glDeleteRenderbuffers(1, &color_rb);
2500 if (fallback_fmt_used && regular_fmt_used)
2502 FIXME(
"Format %s needs different render target formats for different resource types.\n",
2535 unsigned int i,
type;
2556 TRACE(
"Format %s is supported as FBO color attachment, resource type %u.\n",
2560 regular_fmt_used =
TRUE;
2566 TRACE(
"Format %s supports post-pixelshader blending, resource type %u.\n",
2572 TRACE(
"Format %s doesn't support post-pixelshader blending, resource typed %u.\n",
2574 format->flags[
type] &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
2583 WARN(
"Format %s with rendertarget flag is not supported as FBO color attachment"
2584 " and no fallback specified, resource type %u.\n",
2586 format->flags[
type] &= ~WINED3DFMT_FLAG_RENDERTARGET;
2589 TRACE(
"Format %s is not supported as FBO color attachment,"
2599 TRACE(
"Format %s rtInternal format is supported as FBO color attachment,"
2601 fallback_fmt_used =
TRUE;
2605 WARN(
"Format %s rtInternal format is not supported as FBO color attachment,"
2607 format->flags[
type] &= ~WINED3DFMT_FLAG_RENDERTARGET;
2618 TRACE(
"Format %s's sRGB format is FBO attachable, resource type %u.\n",
2626 WARN(
"Format %s's sRGB format is not FBO attachable, resource type %u.\n",
2635 if (fallback_fmt_used && regular_fmt_used)
2637 FIXME(
"Format %s needs different render target formats for different resource types.\n",
2648 gl_info->
fbo_ops.glGenFramebuffers(1, &fbo);
2658 if (!
format->glInternal)
continue;
2662 TRACE(
"Skipping format %s because it's a compressed format.\n",
2679 gl_info->
fbo_ops.glDeleteFramebuffers(1, &fbo);
2786 if (view_classes[
i].internal_format == internal_format)
2787 return view_classes[
i].view_class;
2795 GLenum internal_view_class, gamma_view_class, rt_view_class;
2801 if (internal_view_class == gamma_view_class || gamma_view_class == rt_view_class)
2803 format->gl_view_class = internal_view_class;
2804 TRACE(
"Format %s is member of GL view class %#x.\n",
2818 unsigned int i, max_log2;
2828 if (srgb_format ||
format->glGammaInternal !=
format->glInternal)
2833 if (srgb_write_supported)
2856 if (srgb_format ||
format->glGammaInternal !=
format->glInternal)
2910 if (gl_info->
limits.samples) {
2914 for (
i = 1;
i <= max_log2; ++
i)
2915 format->multisample_types |= 1u << ((1u <<
i) - 1);
2961 format->height_scale.numerator = 1;
2962 format->height_scale.denominator = 1;
3027 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
3029 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
3031 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
3033 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
3040 static const DWORD data[] = {0x00000000, 0xffffffff};
3042 DWORD readback[16 * 1];
3055 while (gl_info->
gl_ops.gl.p_glGetError());
3059 memset(readback, 0x7e,
sizeof(readback));
3068 gl_info->
gl_ops.gl.p_glGenTextures(1, &tex);
3079 gl_info->
fbo_ops.glGenFramebuffers(1, &fbo);
3084 gl_info->
gl_ops.gl.p_glViewport(0, 0, 16, 1);
3087 gl_info->
gl_ops.gl.p_glLoadIdentity();
3089 gl_info->
gl_ops.gl.p_glLoadIdentity();
3091 gl_info->
gl_ops.gl.p_glClearColor(0, 1, 0, 0);
3095 gl_info->
gl_ops.gl.p_glTexCoord2f(0.0, 0.0);
3096 gl_info->
gl_ops.gl.p_glVertex2f(-1.0f, -1.0f);
3097 gl_info->
gl_ops.gl.p_glTexCoord2f(1.0, 0.0);
3098 gl_info->
gl_ops.gl.p_glVertex2f(1.0f, -1.0f);
3099 gl_info->
gl_ops.gl.p_glTexCoord2f(0.0, 1.0);
3100 gl_info->
gl_ops.gl.p_glVertex2f(-1.0f, 1.0f);
3101 gl_info->
gl_ops.gl.p_glTexCoord2f(1.0, 1.0);
3102 gl_info->
gl_ops.gl.p_glVertex2f(1.0f, 1.0f);
3103 gl_info->
gl_ops.gl.p_glEnd();
3106 memset(readback, 0x7f,
sizeof(readback));
3111 TRACE(
"Read back colors 0x%08x and 0x%08x close to unfiltered color, assuming no filtering\n",
3112 readback[6], readback[9]);
3117 TRACE(
"Read back colors are 0x%08x and 0x%08x, assuming texture is filtered\n",
3118 readback[6], readback[9]);
3123 gl_info->
fbo_ops.glDeleteFramebuffers(1, &fbo);
3124 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &tex);
3128 if (gl_info->
gl_ops.gl.p_glGetError())
3130 FIXME(
"Error during filtering test for format %x, returning no filtering\n",
internal);
3140 unsigned int fmt_idx,
i;
3156 WARN(
"No FBO support, or no FBO ORM, guessing filter info from GL caps\n");
3159 TRACE(
"Nvidia card with texture_float support: Assuming float16 blending\n");
3162 else if (gl_info->
limits.glsl_varyings > 44)
3164 TRACE(
"More than 44 GLSL varyings - assuming d3d10 card with float16 blending\n");
3169 TRACE(
"Assuming no float16 blending\n");
3188 if (!
format->glInternal)
continue;
3307 gl_info->
formats[
idx].height_scale.numerator = 3;
3308 gl_info->
formats[
idx].height_scale.denominator = 2;
3313 gl_info->
formats[
idx].height_scale.numerator = 3;
3314 gl_info->
formats[
idx].height_scale.denominator = 2;
3443 TRACE(
"Checking support for fixup:\n");
3445 if (!
adapter->shader_backend->shader_color_fixup_supported(
format->color_fixup)
3446 || !
adapter->fragment_pipe->color_fixup_supported(
format->color_fixup))
3448 TRACE(
"[FAILED]\n");
3522 FIXME(
"Unhandled GL type %#x.\n",
type);
3546 format->component_count)))
3548 ERR(
"Invalid attribute size for vertex format %s (%#x).\n",
3579 struct wined3d_format *typeless_format, *typeless_ds_format, *ds_format;
3593 typeless_ds_format->
flags[
j] = typeless_format->
flags[
j];
3619 if (!gl_info->
fbo_ops.glGenerateMipmap)
3636 static const float offset = -63.0f / 128.0f;
3646 gl_info->
fbo_ops.glGenFramebuffers(1, &fbo);
3652 gl_info->
gl_ops.gl.p_glClearColor(1.0f, 1.0f, 1.0f, 1.0f);
3663 TRACE(
"Readback colors are 0x%08x, 0x%08x, 0x%08x, 0x%08x.\n",
3664 readback[0], readback[1], readback[2], readback[3]);
3667 gl_info->
fbo_ops.glDeleteFramebuffers(1, &fbo);
3673 if (readback[
i] != 0xffff0000)
3684 unsigned int low = 0, high = 32,
cur;
3685 DWORD readback[256];
3688 {-1.0f, -1.0f, -1.0f},
3689 { 1.0f, -1.0f, 0.0f},
3690 {-1.0f, 1.0f, -1.0f},
3691 { 1.0f, 1.0f, 0.0f},
3696 unsigned int fallback = 23;
3700 FIXME(
"No FBOs, assuming polyoffset scale of 2^%u.\n", fallback);
3701 return (
float)(1u << fallback);
3713 gl_info->
fbo_ops.glGenFramebuffers(1, &fbo);
3719 gl_info->
gl_ops.gl.p_glClearColor(0.0f, 0.0f, 0.5f, 0.0f);
3720 gl_info->
gl_ops.gl.p_glClearDepth(0.5f);
3723 gl_info->
gl_ops.gl.p_glViewport(0, 0, 256, 1);
3728 if (high - low <= 1)
3730 ERR(
"PolygonOffset scale factor detection failed, using fallback value 2^%u.\n", fallback);
3734 cur = (low + high) / 2;
3739 gl_info->
gl_ops.gl.p_glPolygonOffset(0.0f, (
float)(1u <<
cur) * 0.25f);
3748 TRACE(
"low %02u, high %02u, cur %2u, 0=0x%08x, 125=0x%08x, 131=0x%08x, 255=0x%08x\n",
3749 low, high,
cur, readback[0], readback[125], readback[131], readback[255]);
3751 if ((readback[125] & 0xff) < 0xa0)
3753 else if ((readback[131] & 0xff) > 0xa0)
3764 gl_info->
fbo_ops.glDeleteFramebuffers(1, &fbo);
3770 return (
float)(1u <<
cur);
3794 format->depth_bias_scale /= 1u << 24;
3840 FIXME(
"Can't find format %s (%#x) in the format lookup table.\n",
3855 FIXME(
"Cannot find depth/stencil typeless format %s (%#x).\n",
3877 unsigned int width,
unsigned int height,
unsigned int *row_pitch,
unsigned int *slice_pitch)
3883 unsigned int row_block_count = (
width +
format->block_width - 1) /
format->block_width;
3884 unsigned int slice_block_count = (
height +
format->block_height - 1) /
format->block_height;
3885 *row_pitch = row_block_count *
format->block_byte_count;
3887 *slice_pitch = *row_pitch * slice_block_count;
3893 *slice_pitch = *row_pitch *
height;
3899 *slice_pitch *=
format->height_scale.numerator;
3900 *slice_pitch /=
format->height_scale.denominator;
3903 TRACE(
"Returning row pitch %u, slice pitch %u.\n", *row_pitch, *slice_pitch);
3909 unsigned int row_pitch, slice_pitch;
3919 return slice_pitch *
depth;
3961 v->x,
v->y,
v->z,
v->w);
3969 v->x,
v->y,
v->z,
v->w);
3977 v->x,
v->y,
v->z,
v->w);
3984#define FMT_TO_STR(format_id) case format_id: return #format_id
4145 FIXME(
"Unrecognized %#x (as fourcc: %s) WINED3DFORMAT!\n",
format_id, fourcc);
4149 return "unrecognized";
4157#define DEVTYPE_TO_STR(dev) case dev: return #dev
4161#undef DEVTYPE_TO_STR
4164 return "unrecognized";
4205#define ACCESS_TO_STR(x) if (access & x) { debug_append(&buffer, #x, " | "); access &= ~x; }
4212 FIXME(
"Unrecognised access flag(s) %#x.\n",
access);
4222#define WINED3DUSAGE_TO_STR(x) if (usage & x) { debug_append(&buffer, #x, " | "); usage &= ~x; }
4242#undef WINED3DUSAGE_TO_STR
4244 FIXME(
"Unrecognized usage flag(s) %#x.\n",
usage);
4254#define WINED3DUSAGEQUERY_TO_STR(x) if (usage & x) { debug_append(&buffer, #x, " | "); usage &= ~x; }
4263#undef WINED3DUSAGEQUERY_TO_STR
4265 FIXME(
"Unrecognized usage query flag(s) %#x.\n",
usage);
4274#define WINED3DDECLMETHOD_TO_STR(u) case u: return #u
4282#undef WINED3DDECLMETHOD_TO_STR
4284 FIXME(
"Unrecognized declaration method %#x.\n",
method);
4285 return "unrecognized";
4293#define WINED3DDECLUSAGE_TO_STR(u) case u: return #u
4308#undef WINED3DDECLUSAGE_TO_STR
4310 FIXME(
"Unrecognized %u declaration usage!\n",
usage);
4311 return "unrecognized";
4317 switch (classification)
4319#define WINED3D_TO_STR(x) case x: return #x
4322#undef WINED3D_TO_STR
4324 FIXME(
"Unrecognized input classification %#x.\n", classification);
4325 return "unrecognized";
4331 switch (resource_type)
4333#define WINED3D_TO_STR(x) case x: return #x
4339#undef WINED3D_TO_STR
4341 FIXME(
"Unrecognized resource type %#x.\n", resource_type);
4342 return "unrecognized";
4348 switch (primitive_type)
4350#define PRIM_TO_STR(prim) case prim: return #prim
4365 FIXME(
"Unrecognized primitive type %#x.\n", primitive_type);
4366 return "unrecognized";
4374#define D3DSTATE_TO_STR(u) case u: return #u
4507#undef D3DSTATE_TO_STR
4509 FIXME(
"Unrecognized %u render state!\n",
state);
4510 return "unrecognized";
4518#define D3DSTATE_TO_STR(u) case u: return #u
4532#undef D3DSTATE_TO_STR
4534 FIXME(
"Unrecognized %u sampler state!\n",
state);
4535 return "unrecognized";
4541 switch (filter_type)
4543#define D3DTEXTUREFILTERTYPE_TO_STR(u) case u: return #u
4552#undef D3DTEXTUREFILTERTYPE_TO_STR
4554 FIXME(
"Unrecognized texture filter type 0x%08x.\n", filter_type);
4555 return "unrecognized";
4563#define D3DSTATE_TO_STR(u) case u: return #u
4582#undef D3DSTATE_TO_STR
4584 FIXME(
"Unrecognized %u texture state!\n",
state);
4585 return "unrecognized";
4593#define D3DTOP_TO_STR(u) case u: return #u
4622 FIXME(
"Unrecognized texture op %#x.\n", d3dtop);
4623 return "unrecognized";
4631#define TSTYPE_TO_STR(tstype) case tstype: return #tstype
4648 if (tstype > 256 && tstype < 512)
4650 FIXME(
"WINED3D_TS_WORLD_MATRIX(%u). 1..255 not currently supported.\n", tstype);
4651 return (
"WINED3D_TS_WORLD_MATRIX > 0");
4653 FIXME(
"Unrecognized transform state %#x.\n", tstype);
4654 return "unrecognized";
4662#define WINED3D_TO_STR(type) case type: return #type
4669#undef WINED3D_TO_STR
4671 FIXME(
"Unrecognized shader type %#x.\n",
type);
4672 return "unrecognized";
4698 return "STATE_COMPUTE_SHADER_RESOURCE_BINDING";
4700 return "STATE_GRAPHICS_SHADER_RESOURCE_BINDING";
4702 return "STATE_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING";
4704 return "STATE_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING";
4708 return "STATE_STREAMSRC";
4710 return "STATE_INDEXBUFFER";
4712 return "STATE_VDECL";
4714 return "STATE_VIEWPORT";
4716 return "STATE_LIGHT_TYPE";
4720 return "STATE_SCISSORRECT";
4724 return "STATE_MATERIAL";
4726 return "STATE_FRONTFACE";
4728 return "STATE_POINTSPRITECOORDORIGIN";
4730 return "STATE_BASEVERTEXINDEX";
4732 return "STATE_FRAMEBUFFER";
4734 return "STATE_POINT_ENABLE";
4736 return "STATE_COLOR_KEY";
4738 return "STATE_STREAM_OUTPUT";
4740 return "STATE_BLEND";
4749#define WINED3D_TO_STR(x) case x: return #x
4768#undef WINED3D_TO_STR
4776#define FBOSTATUS_TO_STR(u) case u: return #u
4789#undef FBOSTATUS_TO_STR
4791 FIXME(
"Unrecognized FBO status 0x%08x.\n",
status);
4792 return "unrecognized";
4798#define GLERROR_TO_STR(u) case u: return #u
4807#undef GLERROR_TO_STR
4809 FIXME(
"Unrecognized GL error 0x%08x.\n",
error);
4810 return "unrecognized";
4818#define WINED3D_TO_STR(x) case x: return #x
4827#undef WINED3D_TO_STR
4829 FIXME(
"Unrecognized fixup_channel_source %#x\n",
source);
4830 return "unrecognized";
4838#define WINED3D_TO_STR(x) case x: return #x
4844#undef WINED3D_TO_STR
4846 FIXME(
"Unrecognized complex fixup %#x\n", fixup);
4847 return "unrecognized";
4870 if (
state->textures[stage])
4890 1.0f, 0.0f, 0.0f, 0.0f,
4891 0.0f, 1.0f, 0.0f, 0.0f,
4892 0.0f, 0.0f, 1.0f, 0.0f,
4893 0.0f, 0.0f, 0.0f, 1.0f,
4912 BOOL flip = !clip_control &&
context->render_offscreen;
4913 float center_offset;
4931 center_offset = 63.0f / 64.0f;
4933 center_offset = -1.0f / 64.0f;
4938 float x =
state->viewport.x;
4939 float y =
state->viewport.y;
4940 float w =
state->viewport.width;
4941 float h =
state->viewport.height;
4942 float x_scale = 2.0f /
w;
4943 float x_offset = (center_offset - (2.0f *
x) -
w) /
w;
4944 float y_scale = flip ? 2.0f /
h : 2.0f / -
h;
4945 float y_offset = flip
4946 ? (center_offset - (2.0f *
y) -
h) /
h
4947 : (center_offset - (2.0f *
y) -
h) / -
h;
4950 float z_scale = zenable ? clip_control ? 1.0f : 2.0f : 0.0f;
4951 float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f;
4954 x_scale, 0.0f, 0.0f, 0.0f,
4955 0.0f, y_scale, 0.0f, 0.0f,
4956 0.0f, 0.0f, z_scale, 0.0f,
4957 x_offset, y_offset, z_offset, 1.0f,
4964 float y_scale = flip ? -1.0f : 1.0f;
4965 float x_offset = center_offset /
state->viewport.width;
4966 float y_offset = flip
4967 ? center_offset /
state->viewport.height
4968 : -center_offset /
state->viewport.height;
4969 float z_scale = clip_control ? 1.0f : 2.0f;
4970 float z_offset = clip_control ? 0.0f : -1.0f;
4973 1.0f, 0.0f, 0.0f, 0.0f,
4974 0.0f, y_scale, 0.0f, 0.0f,
4975 0.0f, 0.0f, z_scale, 0.0f,
4976 x_offset, y_offset, z_offset, 1.0f,
4998 ERR(
"Invalid texture transform flags: WINED3D_TTFF_COUNT1 | WINED3D_TTFF_PROJECTED.\n");
5006 if (!ffp_proj_control)
5031 if (!calculated_coords)
5063 FIXME(
"Unexpected fixed function texture coord input\n");
5066 if (!ffp_proj_control)
5108 generated,
context->last_was_rhw,
5112 device->shader_backend->shader_has_ffp_proj_control(
device->shader_priv),
mat);
5114 if ((
context->lastWasPow2Texture & (1u << tex)) &&
state->textures[tex])
5117 FIXME(
"Non-power-of-two texture being used with generated texture coords.\n");
5122 TRACE(
"Non-power-of-two texture matrix multiply fixup.\n");
5129 float *out_min,
float *out_max)
5148 float *out_pointsize,
float *out_att)
5157 } pointsize,
a,
b,
c;
5176 *out_pointsize = pointsize.f;
5202 *
start = tmpvalue.f;
5218 ERR(
"Unexpected fog coordinate source.\n");
5275 if (
format->id != float_conv[
i].format_id)
5278 ret = ((
DWORD)((
color->r * float_conv[
i].mul.x) + 0.5f)) << float_conv[
i].shift.x;
5279 ret |= ((
DWORD)((
color->g * float_conv[
i].mul.y) + 0.5f)) << float_conv[
i].shift.y;
5280 ret |= ((
DWORD)((
color->b * float_conv[
i].mul.z) + 0.5f)) << float_conv[
i].shift.z;
5281 ret |= ((
DWORD)((
color->a * float_conv[
i].mul.w) + 0.5f)) << float_conv[
i].shift.w;
5290 if (
format->id != double_conv[
i].format_id)
5293 ret = ((
DWORD)((
color->r * double_conv[
i].mul.x) + 0.5)) << double_conv[
i].shift.x;
5294 ret |= ((
DWORD)((
color->g * double_conv[
i].mul.y) + 0.5)) << double_conv[
i].shift.y;
5295 ret |= ((
DWORD)((
color->b * double_conv[
i].mul.z) + 0.5)) << double_conv[
i].shift.z;
5296 ret |= ((
DWORD)((
color->a * double_conv[
i].mul.w) + 0.5)) << double_conv[
i].shift.w;
5346 slop.
r = 0.5f / ((1u <<
format->red_size) - 1);
5347 slop.
g = 0.5f / ((1u <<
format->green_size) - 1);
5348 slop.
b = 0.5f / ((1u <<
format->blue_size) - 1);
5349 slop.
a = 0.5f / ((1u <<
format->alpha_size) - 1);
5371 float_colors[0].
r = 0.0f;
5372 float_colors[0].
g = 0.0f;
5373 float_colors[0].
b = 0.0f;
5374 float_colors[0].
a = (
key->color_space_low_value - 0.5f) / 255.0f;
5376 float_colors[1].
r = 0.0f;
5377 float_colors[1].
g = 0.0f;
5378 float_colors[1].
b = 0.0f;
5379 float_colors[1].
a = (
key->color_space_high_value + 0.5f) / 255.0f;
5433 float pos, neg,
t, det;
5439 t =
in->_11 *
in->_22 *
in->_33;
5445 t =
in->_21 *
in->_32 *
in->_13;
5450 t =
in->_31 *
in->_12 *
in->_23;
5456 t = -
in->_31 *
in->_22 *
in->_13;
5461 t = -
in->_21 *
in->_12 *
in->_33;
5467 t = -
in->_11 *
in->_32 *
in->_23;
5475 if (
fabsf(det) < 1e-25f)
5479 temp._11 = (
in->_22 *
in->_33 -
in->_32 *
in->_23) * det;
5480 temp._12 = -(
in->_12 *
in->_33 -
in->_32 *
in->_13) * det;
5481 temp._13 = (
in->_12 *
in->_23 -
in->_22 *
in->_13) * det;
5482 temp._21 = -(
in->_21 *
in->_33 -
in->_31 *
in->_23) * det;
5483 temp._22 = (
in->_11 *
in->_33 -
in->_31 *
in->_13) * det;
5484 temp._23 = -(
in->_11 *
in->_23 -
in->_21 *
in->_13) * det;
5485 temp._31 = (
in->_21 *
in->_32 -
in->_31 *
in->_22) * det;
5486 temp._32 = -(
in->_11 *
in->_32 -
in->_31 *
in->_12) * det;
5487 temp._33 = (
in->_11 *
in->_22 -
in->_21 *
in->_12) * det;
5504 float m0, m1, m2, m3,
s;
5505 float *r0, *
r1, *
r2, *
r3;
5517 r0[5] = r0[6] = r0[7] = 0.0f;
5524 r1[4] =
r1[6] =
r1[7] = 0.0f;
5531 r2[4] =
r2[5] =
r2[7] = 0.0f;
5538 r3[4] =
r3[5] =
r3[6] = 0.0f;
5551 m1 =
r1[0] / r0[0]; m2 =
r2[0] / r0[0]; m3 =
r3[0] / r0[0];
5552 s = r0[1];
r1[1] -= m1 *
s;
r2[1] -= m2 *
s;
r3[1] -= m3 *
s;
5553 s = r0[2];
r1[2] -= m1 *
s;
r2[2] -= m2 *
s;
r3[2] -= m3 *
s;
5554 s = r0[3];
r1[3] -= m1 *
s;
r2[3] -= m2 *
s;
r3[3] -= m3 *
s;
5593 m2 =
r2[1] /
r1[1]; m3 =
r3[1] /
r1[1];
5594 r2[2] -= m2 *
r1[2];
r3[2] -= m3 *
r1[2];
5595 r2[3] -= m2 *
r1[3];
r3[3] -= m3 *
r1[3];
5629 r3[3] -= m3 *
r2[3];
5630 r3[4] -= m3 *
r2[4];
5631 r3[5] -= m3 *
r2[5];
5632 r3[6] -= m3 *
r2[6];
5633 r3[7] -= m3 *
r2[7];
5649 r2[4] =
s * (
r2[4] -
r3[4] * m2);
5650 r2[5] =
s * (
r2[5] -
r3[5] * m2);
5651 r2[6] =
s * (
r2[6] -
r3[6] * m2);
5652 r2[7] =
s * (
r2[7] -
r3[7] * m2);
5654 r1[4] -=
r3[4] * m1;
5655 r1[5] -=
r3[5] * m1;
5656 r1[6] -=
r3[6] * m1;
5657 r1[7] -=
r3[7] * m1;
5659 r0[4] -=
r3[4] * m0;
5660 r0[5] -=
r3[5] * m0;
5661 r0[6] -=
r3[6] * m0;
5662 r0[7] -=
r3[7] * m0;
5667 r1[4] =
s * (
r1[4] -
r2[4] * m1);
5668 r1[5] =
s * (
r1[5] -
r2[5] * m1);
5669 r1[6] =
s * (
r1[6] -
r2[6] * m1);
5670 r1[7] =
s * (
r1[7] -
r2[7] * m1);
5672 r0[4] -=
r2[4] * m0;
5673 r0[5] -=
r2[5] * m0;
5674 r0[6] -=
r2[6] * m0;
5675 r0[7] -=
r2[7] * m0;
5680 r0[4] =
s * (r0[4] -
r1[4] * m0);
5681 r0[5] =
s * (r0[5] -
r1[5] * m0);
5682 r0[6] =
s * (r0[6] -
r1[6] * m0);
5683 r0[7] =
s * (r0[7] -
r1[7] * m0);
5710 for (
i = 0;
i < 4; ++
i)
5711 for (
j = 0;
j < 4; ++
j)
5712 (&
temp._11)[4 *
j +
i] = (&
m->_11)[4 *
i +
j];
5735 default:
ERR(
"Unexpected position mask\n");
5737 for (
i = 0;
i < numTextures;
i++) {
5789 DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2;
5795 for (
i = 0;
i < d3d_info->
limits.ffp_blend_stages; ++
i)
5884 GLenum texture_dimensions;
5887 texture_dimensions =
texture->target;
6033 if (d3d_info->
limits.varying_count
6036 settings->texcoords_initialized = 0;
6042 settings->texcoords_initialized |= 1u <<
i;
6051 settings->texcoords_initialized |= 1u <<
i;
6089 ERR(
"Failed to insert ffp frag shader.\n");
6111 checkGLcall(
"glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
6116 checkGLcall(
"glDisable(GL_TEXTURE_RECTANGLE_ARB)");
6129 checkGLcall(
"glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
6134 checkGLcall(
"glDisable(GL_TEXTURE_RECTANGLE_ARB)");
6149 checkGLcall(
"glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
6152 checkGLcall(
"glEnable(GL_TEXTURE_RECTANGLE_ARB)");
6158 checkGLcall(
"glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
6163 checkGLcall(
"glDisable(GL_TEXTURE_RECTANGLE_ARB)");
6182 checkGLcall(
"glDisable(GL_TEXTURE_RECTANGLE_ARB)");
6200 checkGLcall(
"glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
6205 checkGLcall(
"glDisable(GL_TEXTURE_RECTANGLE_ARB)");
6235 return memcmp(ka, kb,
sizeof(*ka));
6244 unsigned int coord_idx,
i;
6340 switch (
state->lights[
i]->OriginalParms.type)
6349 ++
settings->directional_light_count;
6352 ++
settings->parallel_point_light_count;
6355 FIXME(
"Unhandled light type %#x.\n",
state->lights[
i]->OriginalParms.type);
6393 return memcmp(ka, kb,
sizeof(*ka));
6400 const char *suffix =
"";
6410#define LOCATION_TO_STR(x) if (location & x) { debug_append(&buffer, #x, " | "); location &= ~x; }
6420#undef LOCATION_TO_STR
6453 WARN(
"DC %p does not belong to window %p.\n",
dc,
window);
6455 ERR(
"Failed to release device context %p, last error %#x.\n",
dc,
GetLastError());
6528 SIZE_T max_capacity, new_capacity;
6531 if (
count <= *capacity)
6535 if (
count > max_capacity)
6538 new_capacity =
max(1, *capacity);
6539 while (new_capacity <
count && new_capacity <= max_capacity / 2)
6541 if (new_capacity <
count)
6542 new_capacity =
count;
6545 new_elements = heap_alloc_zero(new_capacity *
size);
6551 *elements = new_elements;
6552 *capacity = new_capacity;
struct mke2fs_defaults settings[]
ios_base &_STLP_CALL internal(ios_base &__s)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
_Check_return_ _Ret_maybenull_ _In_ size_t alignment
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static struct stream g_out[STREAM_COUNT]
static struct stream g_in
unsigned int component_count
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num)
void multiply_matrix(D3DMATRIX *dest, const D3DMATRIX *src1, const D3DMATRIX *src2)
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType)
static void convert_p8_uint_b8g8r8a8_unorm(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_palette *palette, const struct wined3d_color_key *color_key)
static float color_to_float(DWORD color, DWORD size, DWORD offset)
static void copy_format(struct wined3d_format *dst_format, const struct wined3d_format *src_format)
static void convert_l4a4_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
#define FMT_TO_STR(format_id)
static GLenum wined3d_gl_type_to_enum(enum wined3d_gl_resource_type type)
void texture_activate_dimensions(const struct wined3d_texture *texture, const struct wined3d_gl_info *gl_info)
#define WINED3D_FORMAT_COUNT
void wined3d_release_dc(HWND window, HDC dc)
static void convert_s1_uint_d15_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
static void query_format_flag(struct wined3d_gl_info *gl_info, struct wined3d_format *format, GLint internal, GLenum pname, DWORD flag, const char *string)
static void convert_r16g16(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
void get_modelview_matrix(const struct wined3d_context *context, const struct wined3d_state *state, unsigned int index, struct wined3d_matrix *mat)
static void x8_d24_unorm_download(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_row_pitch, unsigned int dst_slice_pitch, unsigned int width, unsigned int height, unsigned int depth)
static BOOL init_format_block_info(struct wined3d_gl_info *gl_info)
const char * debug_d3ddevicetype(enum wined3d_device_type device_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 void convert_r5g5_snorm_l6_unorm_nv(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
const struct wined3d_format * wined3d_get_format(const struct wined3d_gl_info *gl_info, enum wined3d_format_id format_id, unsigned int resource_usage)
const char * debug_box(const struct wined3d_box *box)
static void init_format_gen_mipmap_info(struct wined3d_gl_info *gl_info)
#define WINED3D_TO_STR(x)
static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct wined3d_gl_info *gl_info)
static void create_and_bind_fbo_attachment(const struct wined3d_gl_info *gl_info, unsigned int flags, enum wined3d_gl_resource_type d3d_type, GLuint *object, GLenum internal, GLenum format, GLenum type)
const struct ffp_frag_desc * find_ffp_frag_shader(const struct wine_rb_tree *fragment_shaders, const struct ffp_frag_settings *settings)
const char * debug_ivec4(const struct wined3d_ivec4 *v)
const char * debug_d3dformat(enum wined3d_format_id format_id)
static BOOL init_typeless_formats(struct wined3d_gl_info *gl_info)
static const struct wined3d_typeless_format_depth_stencil_info typeless_depth_stencil_formats[]
void get_fog_start_end(const struct wined3d_context *context, const struct wined3d_state *state, float *start, float *end)
static void convert_s8_uint_d24_float(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
const char * debug_d3dtexturestate(enum wined3d_texture_stage_state state)
const char * debug_d3dinput_classification(enum wined3d_input_classification classification)
BOOL is_invalid_op(const struct wined3d_state *state, int stage, enum wined3d_texture_op op, DWORD arg1, DWORD arg2, DWORD arg3)
static const char * debug_fixup_channel_source(enum fixup_channel_source source)
static const struct wined3d_typed_format_info typed_formats[]
const char * debug_d3dstate(DWORD state)
DWORD wined3d_format_convert_from_float(const struct wined3d_format *format, const struct wined3d_color *color)
static int get_format_idx(enum wined3d_format_id format_id)
void wined3d_gl_limits_get_texture_unit_range(const struct wined3d_gl_limits *gl_limits, enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count)
#define WINED3DDECLUSAGE_TO_STR(u)
#define D3DSTATE_TO_STR(u)
static GLenum lookup_gl_view_class(GLenum internal_format)
const char * debug_d3dsamplerstate(enum wined3d_sampler_state state)
static void init_debug_buffer(struct debug_buffer *buffer, const char *default_string)
BOOL invert_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m)
enum wined3d_format_id id
UINT wined3d_format_calculate_size(const struct wined3d_format *format, UINT alignment, UINT width, UINT height, UINT depth)
static BOOL init_format_vertex_info(struct wined3d_gl_info *gl_info)
static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_format *format)
static void swap_rows(float **a, float **b)
const char * debug_shader_type(enum wined3d_shader_type type)
const char * debug_vec4(const struct wined3d_vec4 *v)
static struct wined3d_format * get_format_internal(struct wined3d_gl_info *gl_info, enum wined3d_format_id format_id)
BOOL wined3d_caps_gl_ctx_test_viewport_subpixel_bits(struct wined3d_caps_gl_ctx *ctx)
BOOL wined3d_clip_blit(const RECT *clip_rect, RECT *clipped, RECT *other)
const char * debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
void get_identity_matrix(struct wined3d_matrix *mat)
static void convert_r16g16_snorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
static void apply_format_fixups(struct wined3d_adapter *adapter, struct wined3d_gl_info *gl_info)
const char * debug_d3dtstype(enum wined3d_transform_state tstype)
static const struct wined3d_format_texture_info format_texture_info[]
#define PRIM_TO_STR(prim)
static BOOL color_match(DWORD c1, DWORD c2, BYTE max_diff)
static void init_format_depth_bias_scale(struct wined3d_caps_gl_ctx *ctx, const struct wined3d_d3d_info *d3d_info)
const char * debug_uvec4(const struct wined3d_uvec4 *v)
#define LOCATION_TO_STR(x)
void transpose_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m)
static float wined3d_adapter_find_polyoffset_scale(struct wined3d_caps_gl_ctx *ctx, GLenum format)
static BOOL check_filter(const struct wined3d_gl_info *gl_info, GLenum internal)
static BOOL init_format_base_info(struct wined3d_gl_info *gl_info)
void wined3d_ftoa(float value, char *s)
int wined3d_ffp_frag_program_key_compare(const void *key, const struct wine_rb_entry *entry)
static void convert_b8g8r8x8_unorm_b8g8r8a8_unorm_color_key(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_palette *palette, const struct wined3d_color_key *color_key)
static void convert_r5g5_snorm_l6_unorm_ext(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
void get_pointsize_minmax(const struct wined3d_context *context, const struct wined3d_state *state, float *out_min, float *out_max)
const char * debug_d3ddeclmethod(enum wined3d_decl_method method)
static const struct @293 format_index_remap[]
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
#define D3DTEXTUREFILTERTYPE_TO_STR(u)
static void format_set_flag(struct wined3d_format *format, unsigned int flag)
const char * debug_d3drenderstate(enum wined3d_render_state state)
static void convert_r8g8_snorm_l8x8_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
static void convert_b8g8r8_unorm_b8g8r8a8_unorm_color_key(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_palette *palette, const struct wined3d_color_key *color_key)
static BOOL color_in_range(const struct wined3d_color_key *color_key, DWORD color)
static void convert_r5g5_snorm_l6_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
static void convert_r32g32_float(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
void get_pointsize(const struct wined3d_context *context, const struct wined3d_state *state, float *out_pointsize, float *out_att)
#define WINED3DUSAGEQUERY_TO_STR(x)
static const char * debug_complex_fixup(enum complex_fixup fixup)
const char * debug_d3dusage(DWORD usage)
static void convert_s4x4_uint_d24_unorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
static unsigned int calculate_vertex_attribute_size(GLenum type, unsigned int component_count)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
static void convert_r8g8b8a8_snorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
unsigned int wined3d_max_compat_varyings(const struct wined3d_gl_info *gl_info)
const char * debug_d3dtop(enum wined3d_texture_op d3dtop)
static const struct wined3d_format_ddi_info ddi_formats[]
const struct wined3d_color_key_conversion * wined3d_format_get_color_key_conversion(const struct wined3d_texture *texture, BOOL need_alpha_ck)
static void convert_b8g8r8a8_unorm_b8g8r8a8_unorm_color_key(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_palette *palette, const struct wined3d_color_key *color_key)
const char * debug_d3dtexturefiltertype(enum wined3d_texture_filter_type filter_type)
BOOL wined3d_formats_are_srgb_variants(enum wined3d_format_id format1, enum wined3d_format_id format2)
#define WINED3D_FORMAT_FOURCC_BASE
static const struct wined3d_format_channels formats[]
static const struct wined3d_format_srgb_info format_srgb_info[]
static enum wined3d_channel_type map_channel_type(char t)
const char * debug_fboattachment(GLenum attachment)
void sampler_texdim(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
static const struct wined3d_format_block_info format_block_info[]
const char * debug_d3ddeclusage(enum wined3d_decl_usage usage)
const char * debug_glerror(GLenum error)
const char * wined3d_debug_location(DWORD location)
#define WINED3DDECLMETHOD_TO_STR(u)
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)
static void format_clear_flag(struct wined3d_format *format, unsigned int flag)
static void query_internal_format(struct wined3d_adapter *adapter, struct wined3d_format *format, const struct wined3d_format_texture_info *texture_info, struct wined3d_gl_info *gl_info, BOOL srgb_write_supported, BOOL srgb_format)
static void compute_texture_matrix(const struct wined3d_gl_info *gl_info, const struct wined3d_matrix *matrix, DWORD flags, BOOL calculated_coords, BOOL transformed, enum wined3d_format_id format_id, BOOL ffp_proj_control, struct wined3d_matrix *out_matrix)
BOOL invert_matrix_3d(struct wined3d_matrix *out, const struct wined3d_matrix *in)
void wined3d_format_get_float_color_key(const struct wined3d_format *format, const struct wined3d_color_key *key, struct wined3d_color *float_colors)
static void debug_append(struct debug_buffer *buffer, const char *str, const char *separator)
static void x8_d24_unorm_upload(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_row_pitch, unsigned int dst_slice_pitch, unsigned int width, unsigned int height, unsigned int depth)
static void convert_r8g8_snorm(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
void wined3d_gl_limits_get_uniform_block_range(const struct wined3d_gl_limits *gl_limits, enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count)
BOOL wined3d_format_is_depth_view(enum wined3d_format_id resource_format_id, enum wined3d_format_id view_format_id)
void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *desc)
static void convert_b5g6r5_unorm_b5g5r5a1_unorm_color_key(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_palette *palette, const struct wined3d_color_key *color_key)
static void query_view_class(struct wined3d_format *format)
void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d_state *state, struct ffp_frag_settings *settings, BOOL ignore_textype)
static void convert_b5g5r5x1_unorm_b5g5r5a1_unorm_color_key(const BYTE *src, unsigned int src_pitch, BYTE *dst, unsigned int dst_pitch, unsigned int width, unsigned int height, const struct wined3d_palette *palette, const struct wined3d_color_key *color_key)
static void delete_fbo_attachment(const struct wined3d_gl_info *gl_info, enum wined3d_gl_resource_type d3d_type, GLuint object)
static const struct wined3d_format_base_flags format_base_flags[]
void get_texture_matrix(const struct wined3d_context *context, const struct wined3d_state *state, unsigned int tex, struct wined3d_matrix *mat)
const char * wined3d_debug_resource_access(DWORD access)
#define GLERROR_TO_STR(u)
static void draw_test_quad(struct wined3d_caps_gl_ctx *ctx, const struct wined3d_vec3 *geometry, const struct wined3d_color *color)
const char * debug_d3dusagequery(DWORD usage)
void wined3d_ffp_get_vs_settings(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_ffp_vs_settings *settings)
#define TSTYPE_TO_STR(tstype)
BOOL wined3d_adapter_init_format_info(struct wined3d_adapter *adapter, struct wined3d_caps_gl_ctx *ctx)
enum wined3d_format_id pixelformat_for_depth(DWORD depth)
static void convert_r8g8_snorm_l8x8_unorm_nv(const BYTE *src, BYTE *dst, UINT src_row_pitch, UINT src_slice_pitch, UINT dst_row_pitch, UINT dst_slice_pitch, UINT width, UINT height, UINT depth)
void get_projection_matrix(const struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_matrix *mat)
#define FBOSTATUS_TO_STR(u)
const char * debug_color(const struct wined3d_color *color)
static void init_format_filter_info(struct wined3d_gl_info *gl_info, enum wined3d_pci_vendor vendor)
#define DEVTYPE_TO_STR(dev)
const char * debug_fbostatus(GLenum status)
int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry)
static const struct wined3d_format_vertex_info format_vertex_info[]
#define WINED3DUSAGE_TO_STR(x)
void dump_color_fixup_desc(struct color_fixup_desc fixup)
static void init_format_fbo_compat_info(struct wined3d_caps_gl_ctx *ctx)
const char * wine_dbg_sprintf(const char *format,...)
static const WCHAR separator[]
#define GL_TEXTURE_MIN_FILTER
#define GL_TEXTURE_WRAP_R
GLint GLint GLsizei GLsizei GLsizei depth
#define GL_TEXTURE_WRAP_S
#define GL_UNSIGNED_SHORT_4_4_4_4_REV
#define GL_UNSIGNED_SHORT
GLint GLint GLint GLint GLint x
#define GL_POLYGON_OFFSET_FILL
#define GL_LUMINANCE_ALPHA
GLuint GLuint GLsizei count
#define GL_TEXTURE_MAX_LEVEL
#define GL_LUMINANCE4_ALPHA4
GLuint GLuint GLsizei GLenum type
#define GL_INVALID_OPERATION
#define GL_STACK_OVERFLOW
GLint GLint GLint GLint GLint GLint y
GLAPI void GLAPIENTRY glTexImage3D(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
#define GL_COLOR_BUFFER_BIT
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define GL_ONE_MINUS_SRC_ALPHA
#define GL_LUMINANCE8_ALPHA8
GLint GLint GLsizei GLsizei height
#define GL_DEPTH_COMPONENT
GLdouble GLdouble GLdouble r
#define GL_UNSIGNED_INT_8_8_8_8
#define GL_TEXTURE_WRAP_T
#define GL_TEXTURE_MAG_FILTER
#define GL_TRIANGLE_STRIP
GLint GLint GLsizei width
#define GL_UNSIGNED_BYTE_3_3_2
#define GL_UNSIGNED_SHORT_1_5_5_5_REV
#define GL_UNSIGNED_INT_8_8_8_8_REV
#define GL_UNSIGNED_SHORT_5_6_5
#define GL_DEPTH_BUFFER_BIT
#define GL_UNSIGNED_INT_2_10_10_10_REV
#define GL_STACK_UNDERFLOW
#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE
#define GL_UNSIGNED_INT_24_8_EXT
#define GL_DEPTH32F_STENCIL8
#define GL_NUM_SAMPLE_COUNTS
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB
#define GL_COLOR_ATTACHMENT5
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB
#define GL_FRAGMENT_SHADER
#define GL_DEPTH_COMPONENT32F
#define GL_FRAMEBUFFER_UNDEFINED
#define GL_SIGNED_HILO16_NV
#define GL_DEPTH24_STENCIL8
#define GL_DEPTH_COMPONENT16
#define GL_UNSIGNED_INT_10F_11F_11F_REV
#define GL_COMPRESSED_RED_RGTC1
#define GL_COLOR_ATTACHMENT13
#define GL_COMPRESSED_RG_RGTC2
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT
#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB
#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT
#define GL_COLOR_ATTACHMENT7
#define GL_DSDT_MAG_VIB_NV
#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB
#define GL_UNSIGNED_SHORT_8_8_APPLE
GLuint GLuint GLuint GLuint arg1
#define GL_COLOR_ATTACHMENT9
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB
#define GL_COLOR_ATTACHMENT0
GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg3
#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV
GLuint GLuint GLuint GLuint GLuint GLuint GLuint arg2
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB
#define GL_COLOR_ATTACHMENT11
#define GL_TEXTURE_CUBE_MAP_ARB
#define GL_COLOR_ATTACHMENT2
#define GL_DEPTH_STENCIL_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
#define GL_UNSIGNED_INT_24_8
GLboolean GLboolean GLboolean b
#define GL_COLOR_ATTACHMENT1
#define GL_DEPTH_COMPONENT24_ARB
#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT
#define GL_COLOR_ATTACHMENT3
#define GL_COLOR_ATTACHMENT8
#define GL_FRAMEBUFFER_COMPLETE
#define GL_SLUMINANCE8_ALPHA8_EXT
#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV
#define GL_DEPTH_COMPONENT32_ARB
#define GL_UNSIGNED_INT_5_9_9_9_REV_EXT
#define GL_COLOR_ATTACHMENT10
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT
#define GL_COLOR_ATTACHMENT15
#define GL_DEPTH24_STENCIL8_EXT
#define GL_FRAMEBUFFER_UNSUPPORTED
#define GL_COLOR_ATTACHMENT4
GLuint GLint GLboolean GLint GLenum access
#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER
#define GL_R11F_G11F_B10F
#define GL_TEXTURE_2D_MULTISAMPLE
#define GL_COMPRESSED_SIGNED_RG_RGTC2
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
#define GL_INVALID_FRAMEBUFFER_OPERATION
#define GL_HALF_FLOAT_ARB
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT
#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB
#define GL_COLOR_ATTACHMENT12
#define GL_SRGB8_ALPHA8_EXT
#define GL_TEXTURE_RECTANGLE_ARB
#define GL_DEPTH_ATTACHMENT
#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER
GLboolean GLboolean GLboolean GLboolean a
#define GL_COLOR_ATTACHMENT6
#define GL_UNSIGNED_SHORT_8_8_REV_APPLE
#define GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT
#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS
#define GL_SLUMINANCE8_EXT
#define GL_DSDT8_MAG8_INTENSITY8_NV
#define GL_COLOR_ATTACHMENT14
GLubyte GLubyte GLubyte GLubyte w
#define GL_COMPRESSED_SRGB_S3TC_DXT1_EXT
#define GL_COMPRESSED_SIGNED_RED_RGTC1
#define GL_SIGNED_RGBA8_NV
GLsizeiptr const GLvoid GLenum usage
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB
#define GL_STENCIL_ATTACHMENT
#define GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT
GLfloat GLfloat GLfloat GLfloat h
#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB
#define GL_YCBCR_422_APPLE
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 flag
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
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
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 j
void shader_glsl_validate_link(const struct wined3d_gl_info *gl_info, GLuint program)
void print_glsl_info_log(const struct wined3d_gl_info *gl_info, GLuint id, BOOL program)
_Check_return_ __CRT_INLINE float __CRTDECL fabsf(_In_ float x)
float __cdecl copysignf(float, float)
#define memcpy(s1, s2, n)
#define sprintf(buf, format,...)
static const WCHAR desc[]
static const char * dst_format
static IHTMLWindow2 * window
static float(__cdecl *square_half_float)(float x
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
static void * heap_calloc(SIZE_T count, SIZE_T size)
#define WINE_RB_ENTRY_VALUE(element, type, field)
static struct wine_rb_entry * wine_rb_get(const struct wine_rb_tree *tree, const void *key)
static int wine_rb_put(struct wine_rb_tree *tree, const void *key, struct wine_rb_entry *entry)
unsigned short y_sign_fixup
unsigned short x_sign_fixup
unsigned short z_sign_fixup
unsigned short w_sign_fixup
BOOL emulated_flatshading
struct wined3d_d3d_limits limits
DWORD wined3d_creation_flags
enum wined3d_gl_extension extension
void(* download)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_row_pitch, unsigned int dst_slice_pitch, unsigned int width, unsigned int height, unsigned int depth)
enum wined3d_format_id id
unsigned int conv_byte_count
void(* upload)(const BYTE *src, BYTE *dst, unsigned int src_row_pitch, unsigned int src_slice_pitch, unsigned int dst_row_pitch, unsigned int dst_slice_pitch, unsigned int width, unsigned int height, unsigned int depth)
unsigned int format_count
BOOL supported[WINED3D_GL_EXT_COUNT]
struct opengl_funcs gl_ops
struct wined3d_gl_limits limits
struct wined3d_format * formats
struct wined3d_fbo_ops fbo_ops
unsigned int samplers[WINED3D_SHADER_TYPE_COUNT]
unsigned int graphics_samplers
unsigned int combined_samplers
unsigned int uniform_blocks[WINED3D_SHADER_TYPE_COUNT]
int offscreen_rendering_mode
DWORD position_transformed
Character const *const prefix
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
#define GL_VIEW_CLASS_16_BITS
#define GL_VIEW_CLASS_96_BITS
#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM
#define GL_VIEW_CLASS_S3TC_DXT1_RGB
#define GL_VIEW_CLASS_128_BITS
#define GL_VIEW_CLASS_S3TC_DXT5_RGBA
#define GL_VIEW_CLASS_S3TC_DXT1_RGBA
#define GL_VIEW_CLASS_24_BITS
#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT
#define GL_VERTEX_TEXTURE
#define GL_VIEW_CLASS_8_BITS
#define GL_VIEW_CLASS_BPTC_FLOAT
#define GL_VIEW_CLASS_48_BITS
#define GL_COMPRESSED_RGBA_BPTC_UNORM
#define GL_VIEW_CLASS_64_BITS
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT
#define GL_FRAMEBUFFER_BLEND
#define GL_VIEW_CLASS_BPTC_UNORM
#define GL_VIEW_CLASS_32_BITS
#define GL_FRAMEBUFFER_RENDERABLE
#define GL_VIEW_CLASS_RGTC1_RED
#define GL_VIEW_CLASS_RGTC2_RG
#define GL_VIEW_CLASS_S3TC_DXT3_RGBA
DWORD WINAPI GetLastError(void)
#define WINED3DUSAGE_WRITEONLY
#define WINED3DUSAGE_QUERY_LEGACYBUMPMAP
static unsigned int wined3d_log2i(unsigned int x)
#define WINED3DUSAGE_POINTS
#define WINED3DUSAGE_DONOTCLIP
#define WINED3DUSAGE_DMAP
#define WINED3D_TS_WORLD_MATRIX(index)
#define WINED3D_NORMALIZED_DEPTH_BIAS
@ WINED3D_DECL_USAGE_DEPTH
@ WINED3D_DECL_USAGE_BLEND_INDICES
@ WINED3D_DECL_USAGE_TESS_FACTOR
@ WINED3D_DECL_USAGE_NORMAL
@ WINED3D_DECL_USAGE_PSIZE
@ WINED3D_DECL_USAGE_BLEND_WEIGHT
@ WINED3D_DECL_USAGE_SAMPLE
@ WINED3D_DECL_USAGE_POSITION
@ WINED3D_DECL_USAGE_BINORMAL
@ WINED3D_DECL_USAGE_COLOR
@ WINED3D_DECL_USAGE_POSITIONT
@ WINED3D_DECL_USAGE_TEXCOORD
@ WINED3D_DECL_USAGE_TANGENT
#define WINED3DFVF_SPECULAR
@ WINED3D_RS_TEXTUREFACTOR
@ WINED3D_RS_COLORKEYENABLE
@ WINED3D_RS_NORMALDEGREE
@ WINED3D_RS_SOFTWAREVERTEXPROCESSING
@ WINED3D_RS_COLORWRITEENABLE7
@ WINED3D_RS_STIPPLEDALPHA
@ WINED3D_RS_COLORWRITEENABLE1
@ WINED3D_RS_STENCILENABLE
@ WINED3D_RS_COLORWRITEENABLE5
@ WINED3D_RS_ANTIALIASEDLINEENABLE
@ WINED3D_RS_SPECULARMATERIALSOURCE
@ WINED3D_RS_DEBUGMONITORTOKEN
@ WINED3D_RS_MAXTESSELLATIONLEVEL
@ WINED3D_RS_DITHERENABLE
@ WINED3D_RS_BACK_STENCILPASS
@ WINED3D_RS_COLORWRITEENABLE4
@ WINED3D_RS_PATCHEDGESTYLE
@ WINED3D_RS_SCISSORTESTENABLE
@ WINED3D_RS_MINTESSELLATIONLEVEL
@ WINED3D_RS_POINTSCALE_A
@ WINED3D_RS_MULTISAMPLEMASK
@ WINED3D_RS_BACK_STENCILFUNC
@ WINED3D_RS_SRGBWRITEENABLE
@ WINED3D_RS_RANGEFOGENABLE
@ WINED3D_RS_POINTSIZE_MIN
@ WINED3D_RS_TEXTUREPERSPECTIVE
@ WINED3D_RS_ENABLEADAPTIVETESSELLATION
@ WINED3D_RS_COLORWRITEENABLE3
@ WINED3D_RS_ALPHABLENDENABLE
@ WINED3D_RS_ADAPTIVETESS_X
@ WINED3D_RS_ADAPTIVETESS_Z
@ WINED3D_RS_COLORWRITEENABLE6
@ WINED3D_RS_POINTSCALE_C
@ WINED3D_RS_FOGTABLEMODE
@ WINED3D_RS_POINTSIZE_MAX
@ WINED3D_RS_ZWRITEENABLE
@ WINED3D_RS_CLIPPLANEENABLE
@ WINED3D_RS_AMBIENTMATERIALSOURCE
@ WINED3D_RS_POINTSPRITEENABLE
@ WINED3D_RS_BACK_STENCILZFAIL
@ WINED3D_RS_POSITIONDEGREE
@ WINED3D_RS_MULTISAMPLEANTIALIAS
@ WINED3D_RS_BACK_STENCILFAIL
@ WINED3D_RS_COLORWRITEENABLE
@ WINED3D_RS_SLOPESCALEDEPTHBIAS
@ WINED3D_RS_DIFFUSEMATERIALSOURCE
@ WINED3D_RS_DEPTHBIASCLAMP
@ WINED3D_RS_NORMALIZENORMALS
@ WINED3D_RS_TWOSIDEDSTENCILMODE
@ WINED3D_RS_TRANSLUCENTSORTINDEPENDENT
@ WINED3D_RS_EMISSIVEMATERIALSOURCE
@ WINED3D_RS_PATCHSEGMENTS
@ WINED3D_RS_SPECULARENABLE
@ WINED3D_RS_ADAPTIVETESS_W
@ WINED3D_RS_SRCBLENDALPHA
@ WINED3D_RS_COLORKEYBLENDENABLE
@ WINED3D_RS_COLORWRITEENABLE2
@ WINED3D_RS_POINTSCALEENABLE
@ WINED3D_RS_FOGVERTEXMODE
@ WINED3D_RS_STENCILWRITEMASK
@ WINED3D_RS_BLENDOPALPHA
@ WINED3D_RS_DESTBLENDALPHA
@ WINED3D_RS_STENCILZFAIL
@ WINED3D_RS_POINTSCALE_B
@ WINED3D_RS_INDEXEDVERTEXBLENDENABLE
@ WINED3D_RS_MIPMAPLODBIAS
@ WINED3D_RS_SEPARATEALPHABLENDENABLE
@ WINED3D_RS_STIPPLEENABLE
@ WINED3D_RS_ADAPTIVETESS_Y
@ WINED3D_RS_ALPHATESTENABLE
@ WINED3D_RS_EDGEANTIALIAS
@ WINED3D_PT_LINESTRIP_ADJ
@ WINED3D_PT_TRIANGLELIST_ADJ
@ WINED3D_PT_LINELIST_ADJ
@ WINED3D_PT_TRIANGLESTRIP_ADJ
@ WINED3D_PT_TRIANGLESTRIP
@ WINED3D_PT_TRIANGLELIST
#define WINED3DFVF_TEXCOUNT_SHIFT
@ WINED3D_DECL_METHOD_LOOKUP
@ WINED3D_DECL_METHOD_LOOKUP_PRESAMPLED
@ WINED3D_DECL_METHOD_PARTIAL_V
@ WINED3D_DECL_METHOD_CROSS_UV
@ WINED3D_DECL_METHOD_PARTIAL_U
@ WINED3D_DECL_METHOD_DEFAULT
#define WINED3DUSAGE_OWNDC
#define WINED3DUSAGE_LEGACY_CUBEMAP
@ WINED3D_SAMP_ELEMENT_INDEX
@ WINED3D_SAMP_MAX_ANISOTROPY
@ WINED3D_SAMP_MIPMAP_LOD_BIAS
@ WINED3D_SAMP_MIN_FILTER
@ WINED3D_SAMP_SRGB_TEXTURE
@ WINED3D_SAMP_DMAP_OFFSET
@ WINED3D_SAMP_MIP_FILTER
@ WINED3D_SAMP_MAG_FILTER
@ WINED3D_SAMP_BORDER_COLOR
@ WINED3D_SAMP_MAX_MIP_LEVEL
#define WINED3D_RESOURCE_ACCESS_GPU
#define WINED3D_RESOURCE_ACCESS_CPU
#define WINED3DFVF_DIFFUSE
@ WINED3D_RTYPE_TEXTURE_2D
@ WINED3D_RTYPE_TEXTURE_1D
@ WINED3D_RTYPE_TEXTURE_3D
#define WINED3DFVF_POSITION_MASK
#define WINED3DTA_SELECTMASK
@ WINED3D_LIGHT_PARALLELPOINT
@ WINED3D_LIGHT_DIRECTIONAL
#define WINED3DTSS_TCI_PASSTHRU
#define WINED3DUSAGE_RESTRICTED_CONTENT
#define WINED3DUSAGE_QUERY_SRGBREAD
wined3d_texture_filter_type
@ WINED3D_TEXF_GAUSSIAN_CUBIC
@ WINED3D_TEXF_PYRAMIDAL_QUAD
@ WINED3D_TEXF_FLAT_CUBIC
@ WINED3D_TEXF_GAUSSIAN_QUAD
@ WINED3D_TEXF_ANISOTROPIC
wined3d_texture_stage_state
@ WINED3D_TSS_BUMPENV_LOFFSET
@ WINED3D_TSS_BUMPENV_MAT11
@ WINED3D_TSS_BUMPENV_MAT10
@ WINED3D_TSS_TEXCOORD_INDEX
@ WINED3D_TSS_BUMPENV_MAT01
@ WINED3D_TSS_BUMPENV_LSCALE
@ WINED3D_TSS_BUMPENV_MAT00
@ WINED3D_TSS_TEXTURE_TRANSFORM_FLAGS
#define WINED3DUSAGE_QUERY_FILTER
#define WINED3D_CKEY_SRC_BLT
#define WINED3DUSAGE_OVERLAY
#define WINED3DFVF_TEXCOUNT_MASK
#define WINED3DFVF_XYZRHW
#define WINED3DFVF_NORMAL
#define WINED3DTA_CURRENT
#define WINED3DUSAGE_QUERY_WRAPANDMIP
@ WINED3DFMT_R32G32B32_TYPELESS
@ WINED3DFMT_B2G3R3_UNORM
@ WINED3DFMT_R32G32B32_SINT
@ WINED3DFMT_BC7_TYPELESS
@ WINED3DFMT_BC7_UNORM_SRGB
@ WINED3DFMT_X24_TYPELESS_G8_UINT
@ WINED3DFMT_BC2_UNORM_SRGB
@ WINED3DFMT_B4G4R4A4_UNORM
@ WINED3DFMT_R16G16_UNORM
@ WINED3DFMT_R8G8_TYPELESS
@ WINED3DFMT_R10G10B10X2_UINT
@ WINED3DFMT_R10G10B10A2_UNORM
@ WINED3DFMT_R8G8_SNORM_Cx
@ WINED3DFMT_R32G32_FLOAT
@ WINED3DFMT_R16G16_SNORM
@ WINED3DFMT_B8G8R8A8_UNORM
@ WINED3DFMT_R24G8_TYPELESS
@ WINED3DFMT_R10G10B10A2_TYPELESS
@ WINED3DFMT_R32G32B32_UINT
@ WINED3DFMT_BC4_TYPELESS
@ WINED3DFMT_R8G8B8A8_SNORM
@ WINED3DFMT_S8_UINT_D24_FLOAT
@ WINED3DFMT_R10G10B10_XR_BIAS_A2_UNORM
@ WINED3DFMT_R16_TYPELESS
@ WINED3DFMT_R16G16B16A16_SINT
@ WINED3DFMT_D16_LOCKABLE
@ WINED3DFMT_R10G11B11_SNORM
@ WINED3DFMT_S1_UINT_D15_UNORM
@ WINED3DFMT_B2G3R3A8_UNORM
@ WINED3DFMT_R8G8_B8G8_UNORM
@ WINED3DFMT_R32G32B32_FLOAT
@ WINED3DFMT_B8G8R8X8_UNORM
@ WINED3DFMT_R32_FLOAT_X8X24_TYPELESS
@ WINED3DFMT_R8G8B8X8_UNORM
@ WINED3DFMT_BC1_UNORM_SRGB
@ WINED3DFMT_B5G5R5X1_UNORM
@ WINED3DFMT_B10G10R10A2_UNORM
@ WINED3DFMT_R16G16B16A16_FLOAT
@ WINED3DFMT_R5G5_SNORM_L6_UNORM
@ WINED3DFMT_R8G8B8A8_TYPELESS
@ WINED3DFMT_B8G8R8_UNORM
@ WINED3DFMT_R8G8B8A8_UNORM_SRGB
@ WINED3DFMT_R9G9B9E5_SHAREDEXP
@ WINED3DFMT_B8G8R8X8_TYPELESS
@ WINED3DFMT_B5G5R5A1_UNORM
@ WINED3DFMT_R10G10B10_SNORM_A2_UNORM
@ WINED3DFMT_R8G8B8A8_UNORM
@ WINED3DFMT_R10G10B10A2_UINT
@ WINED3DFMT_G8R8_G8B8_UNORM
@ WINED3DFMT_R32G32B32A32_UINT
@ WINED3DFMT_R16G16B16A16_UNORM
@ WINED3DFMT_R16G16B16A16_TYPELESS
@ WINED3DFMT_R10G10B10A2_SNORM
@ WINED3DFMT_R24_UNORM_X8_TYPELESS
@ WINED3DFMT_D32_FLOAT_S8X24_UINT
@ WINED3DFMT_R8G8_SNORM_L8X8_UNORM
@ WINED3DFMT_X32_TYPELESS_G8X24_UINT
@ WINED3DFMT_B5G6R5_UNORM
@ WINED3DFMT_R16G16B16A16_UINT
@ WINED3DFMT_S4X4_UINT_D24_UNORM
@ WINED3DFMT_BC1_TYPELESS
@ WINED3DFMT_B8G8R8X8_UNORM_SRGB
@ WINED3DFMT_B8G8R8A8_TYPELESS
@ WINED3DFMT_BC3_TYPELESS
@ WINED3DFMT_R16G16_TYPELESS
@ WINED3DFMT_R16G16_FLOAT
@ WINED3DFMT_R8G8B8A8_UINT
@ WINED3DFMT_BC6H_TYPELESS
@ WINED3DFMT_R32G32B32A32_TYPELESS
@ WINED3DFMT_R32_TYPELESS
@ WINED3DFMT_R32G8X24_TYPELESS
@ WINED3DFMT_BC5_TYPELESS
@ WINED3DFMT_R32G32B32A32_SINT
@ WINED3DFMT_R8G8B8A8_SINT
@ WINED3DFMT_R10G10B10X2_SNORM
@ WINED3DFMT_R11G11B10_FLOAT
@ WINED3DFMT_B8G8R8A8_UNORM_SRGB
@ WINED3DFMT_BC3_UNORM_SRGB
@ WINED3DFMT_R32G32B32A32_FLOAT
@ WINED3DFMT_BC2_TYPELESS
@ WINED3DFMT_B4G4R4X4_UNORM
@ WINED3DFMT_MULTI2_ARGB8
@ WINED3DFMT_D24_UNORM_S8_UINT
@ WINED3DFMT_P8_UINT_A8_UNORM
@ WINED3DFMT_R16G16B16A16_SNORM
@ WINED3DFMT_R32G32_TYPELESS
#define WINED3DUSAGE_QUERY_POSTPIXELSHADER_BLENDING
#define WINED3DUSAGE_NPATCHES
@ WINED3D_TOP_SELECT_ARG1
@ WINED3D_TOP_BLEND_DIFFUSE_ALPHA
@ WINED3D_TOP_BLEND_TEXTURE_ALPHA_PM
@ WINED3D_TOP_BLEND_CURRENT_ALPHA
@ WINED3D_TOP_ADD_SIGNED_2X
@ WINED3D_TOP_MODULATE_INVCOLOR_ADD_ALPHA
@ WINED3D_TOP_MULTIPLY_ADD
@ WINED3D_TOP_MODULATE_INVALPHA_ADD_COLOR
@ WINED3D_TOP_BUMPENVMAP_LUMINANCE
@ WINED3D_TOP_MODULATE_COLOR_ADD_ALPHA
@ WINED3D_TOP_MODULATE_4X
@ WINED3D_TOP_SELECT_ARG2
@ WINED3D_TOP_MODULATE_ALPHA_ADD_COLOR
@ WINED3D_TOP_BLEND_TEXTURE_ALPHA
@ WINED3D_TOP_DOTPRODUCT3
@ WINED3D_TOP_PREMODULATE
@ WINED3D_TOP_MODULATE_2X
@ WINED3D_TOP_BLEND_FACTOR_ALPHA
#define WINED3DUSAGE_TEXTAPI
#define WINED3D_RESOURCE_ACCESS_MAP_R
wined3d_depth_buffer_type
#define WINED3DUSAGE_RENDERTARGET
#define WINED3DUSAGE_QUERY_VERTEXTEXTURE
#define WINED3DUSAGE_QUERY_GENMIPMAP
#define WINED3DUSAGE_RTPATCHES
#define WINED3D_HIGHEST_TEXTURE_STATE
#define WINED3DUSAGE_DYNAMIC
#define WINED3DUSAGE_QUERY_SRGBWRITE
#define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE_DRIVER
#define WINED3DUSAGE_STATICDECL
@ WINED3D_DEVICE_TYPE_HAL
@ WINED3D_DEVICE_TYPE_REF
#define WINED3D_PIXEL_CENTER_INTEGER
#define WINED3D_SRGB_READ_WRITE_CONTROL
#define WINED3DUSAGE_TEXTURE
wined3d_input_classification
@ WINED3D_INPUT_PER_INSTANCE_DATA
@ WINED3D_INPUT_PER_VERTEX_DATA
#define WINED3D_RESOURCE_ACCESS_MAP_W
#define WINED3DUSAGE_SOFTWAREPROCESSING
#define WINED3DTA_TEXTURE
#define WINED3DUSAGE_DEPTHSTENCIL
#define WINED3DUSAGE_RESTRICT_SHARED_RESOURCE
@ ARB_INTERNALFORMAT_QUERY
@ EXT_TEXTURE_SHARED_EXPONENT
@ ATI_TEXTURE_COMPRESSION_3DC
@ ARB_TEXTURE_COMPRESSION_RGTC
@ EXT_TEXTURE_SRGB_DECODE
@ ARB_VERTEX_BUFFER_OBJECT
@ ARB_TEXTURE_MULTISAMPLE
@ ARB_INTERNALFORMAT_QUERY2
@ EXT_PACKED_DEPTH_STENCIL
@ EXT_TEXTURE_COMPRESSION_RGTC
@ ARB_VERTEX_TYPE_2_10_10_10_REV
@ WINED3D_GL_LEGACY_CONTEXT
@ ARB_TEXTURE_COMPRESSION_BPTC
@ EXT_TEXTURE_COMPRESSION_S3TC
#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI
static BOOL use_indexed_vertex_blending(const struct wined3d_state *state, const struct wined3d_stream_info *si)
static float float_24_to_32(DWORD in)
static BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
#define STATE_IS_GRAPHICS_CONSTANT_BUFFER(a)
#define STATE_CLIPPLANE(a)
#define STATE_IS_MATERIAL(a)
#define STATE_CONSTANT_BUFFER(a)
#define STATE_IS_SAMPLER(num)
#define STATE_IS_GRAPHICS_UNORDERED_ACCESS_VIEW_BINDING(a)
#define STATE_IS_ACTIVELIGHT(a)
#define WINED3D_LOCATION_TEXTURE_SRGB
static struct color_fixup_desc create_complex_fixup_desc(enum complex_fixup complex_fixup)
#define STATE_IS_STREAM_OUTPUT(a)
#define STATE_IS_POINTSPRITECOORDORIGIN(a)
#define WINED3D_FFP_TCI_SHIFT
#define WINED3DFMT_FLAG_BUMPMAP
#define WINED3D_LOCATION_SYSMEM
#define STATE_IS_VDECL(a)
@ WINED3D_FFP_EMIT_D3DCOLOR
@ WINED3D_FFP_EMIT_FLOAT16_2
@ WINED3D_FFP_EMIT_UBYTE4N
@ 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_FLOAT3
@ WINED3D_FFP_EMIT_FLOAT16_4
@ WINED3D_FFP_EMIT_USHORT4N
@ WINED3D_FFP_EMIT_SHORT2
@ WINED3D_FFP_EMIT_SHORT4
@ WINED3D_FFP_EMIT_FLOAT1
#define STATE_TRANSFORM(a)
#define STATE_IS_COMPUTE_UNORDERED_ACCESS_VIEW_BINDING(a)
#define MAKEDWORD_VERSION(maj, min)
#define STATE_IS_POINT_ENABLE(a)
#define WINED3DFMT_FLAG_SHADOW
static BOOL use_vs(const struct wined3d_state *state)
#define WINED3DFMT_FLAG_SRGB_WRITE
#define WINED3DFMT_FLAG_INTEGER
#define WINED3DFMT_FLAG_HEIGHT_SCALE
#define STATE_IS_STREAMSRC(a)
#define STATE_IS_BLEND(a)
#define WINED3DFMT_FLAG_RENDERTARGET
static enum complex_fixup get_complex_fixup(struct color_fixup_desc fixup)
#define WINED3DFMT_FLAG_BROKEN_PITCH
#define STATE_ACTIVELIGHT(a)
#define WINED3D_LOCATION_BUFFER
#define STATE_IS_TEXTURESTAGE(a)
#define WINED3DFMT_FLAG_VTF
static BOOL is_complex_fixup(struct color_fixup_desc fixup)
#define STATE_IS_COLOR_KEY(a)
@ CHANNEL_SOURCE_COMPLEX1
@ CHANNEL_SOURCE_COMPLEX0
#define WINED3D_FFP_TCI_MASK
#define WINED3D_LOCATION_RB_RESOLVED
#define STATE_IS_CLIPPLANE(a)
static BOOL use_software_vertex_processing(const struct wined3d_device *device)
#define WINED3D_QUIRK_LIMITED_TEX_FILTERING
static enum wined3d_cmp_func wined3d_sanitize_cmp_func(enum wined3d_cmp_func func)
#define STATE_IS_VIEWPORT(a)
#define WINED3D_FRAGMENT_CAP_SRGB_WRITE
#define WINED3DFMT_FLAG_SRGB_READ
#define WINED3DFMT_FLAG_FBO_ATTACHABLE
#define WINED3D_SHADER_CAP_SRGB_WRITE
static const struct color_fixup_desc COLOR_FIXUP_IDENTITY
#define MAX_ACTIVE_LIGHTS
#define STATE_IS_RENDER(a)
#define STATE_IS_COMPUTE_SHADER_RESOURCE_BINDING(a)
#define STATE_SAMPLER(num)
#define WINED3D_TEXTURE_ASYNC_COLOR_KEY
static BOOL is_identity_fixup(struct color_fixup_desc fixup)
static BOOL needs_srgb_write(const struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_fb_state *fb)
@ 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_TEX_RECT
@ WINED3D_GL_RES_TYPE_TEX_1D
@ WINED3D_GL_RES_TYPE_COUNT
#define WINED3D_LOCATION_TEXTURE_RGB
#define WINED3DFMT_FLAG_TEXTURE
#define WINED3D_LOCATION_USER_MEMORY
#define WINED3D_QUIRK_BROKEN_RGBA16
#define WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB
#define WINED3D_LOCATION_DRAWABLE
#define MAX_MULTISAMPLE_TYPES
#define WINED3DFMT_FLAG_BLOCKS
@ WINED3D_SHADER_TYPE_HULL
@ WINED3D_SHADER_TYPE_PIXEL
@ WINED3D_SHADER_TYPE_GEOMETRY
@ WINED3D_SHADER_TYPE_GRAPHICS_COUNT
@ WINED3D_SHADER_TYPE_DOMAIN
@ WINED3D_SHADER_TYPE_COMPUTE
@ WINED3D_SHADER_TYPE_VERTEX
@ WINED3D_SHADER_TYPE_COUNT
static BOOL use_ps(const struct wined3d_state *state)
#define WINED3DFMT_FLAG_FLOAT
#define STATE_IS_COMPUTE_SHADER(a)
@ WINED3D_FFP_VS_FOG_FOGCOORD
@ WINED3D_FFP_VS_FOG_DEPTH
@ WINED3D_FFP_VS_FOG_RANGE
#define WINED3D_LOCATION_DISCARDED
#define STATE_TEXTURESTAGE(stage, num)
#define STATE_IS_FRONTFACE(a)
#define STATE_IS_LIGHT_TYPE(a)
#define STATE_IS_COMPUTE_CONSTANT_BUFFER(a)
@ WINED3D_FFP_PS_FOG_EXP2
@ WINED3D_FFP_PS_FOG_LINEAR
#define STATE_IS_SCISSORRECT(a)
#define WINED3DFMT_FLAG_STENCIL
#define STATE_IS_FRAMEBUFFER(a)
#define WINED3DFMT_FLAG_COMPRESSED
#define STATE_IS_GRAPHICS_SHADER_RESOURCE_BINDING(a)
#define WINED3DFMT_FLAG_EXTENSION
#define WINED3DFMT_FLAG_FILTERING
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
#define WINED3D_LOCATION_RB_MULTISAMPLE
#define WINED3DFMT_FLAG_DEPTH
#define STATE_IS_TRANSFORM(a)
static BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
#define STATE_IS_INDEXBUFFER(a)
#define WINED3D_UNMAPPED_STAGE
static BOOL can_use_texture_swizzle(const struct wined3d_gl_info *gl_info, const struct wined3d_format *format)
#define STATE_IS_GRAPHICS_SHADER(a)
#define STATE_IS_BASEVERTEXINDEX(a)
static struct color_fixup_desc create_color_fixup_desc(int sign0, enum fixup_channel_source src0, int sign1, enum fixup_channel_source src1, int sign2, enum fixup_channel_source src2, int sign3, enum fixup_channel_source src3)
static unsigned int wined3d_popcount(unsigned int x)
#define WINED3DFMT_FLAG_GEN_MIPMAP
#define WINED3DFMT_FLAG_BLOCKS_NO_VERIFY
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HWND WINAPI WindowFromDC(_In_ HDC hDC)
BOOL WINAPI IsRectEmpty(_In_ LPCRECT)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
BOOL WINAPI SetRectEmpty(_Out_ LPRECT)