44 { 1.0f, 1.0f, 1.0f, 0.0f },
45 { 0.0f, 0.0f, 0.0f, 0.0f },
46 { 0.0f, 0.0f, 0.0f, 0.0f },
60 switch (primitive_type)
104 switch (primitive_type)
154 ERR(
"Failed to grow the context array.\n");
159 device->contexts = new_array;
171 for (
i = 0;
i <
device->context_count; ++
i)
182 ERR(
"Context %p doesn't exist in context array.\n",
context);
186 if (!--
device->context_count)
196 ERR(
"Failed to shrink context array. Oh well.\n");
200 device->contexts = new_array;
204 const RECT *draw_rect,
const RECT *clear_rect)
217 if (clear_rect && (clear_rect->
left > 0 || clear_rect->
top > 0
234 UINT drawable_width, drawable_height;
248 WARN(
"Invalid context, skipping clear.\n");
261 for (
i = 0;
i < rt_count; ++
i)
270 draw_rect, rect_count ? clear_rect :
NULL))
279 render_offscreen =
context->render_offscreen;
286 render_offscreen =
TRUE;
312 WARN(
"Failed to apply clear state, skipping clear.\n");
324 gl_info->
gl_ops.gl.p_glStencilMask(~0
U);
342 for (
i = 0;
i < rt_count; ++
i)
352 FIXME(
"Not supported on buffer resources.\n");
364 WARN(
"Clearing multiple sRGB render targets with no GL_ARB_framebuffer_sRGB "
365 "support, this might cause graphical issues.\n");
371 corrected_color.
r =
min(
max(corrected_color.
r, 0.0f), 1.0f);
376 corrected_color.
g =
min(
max(corrected_color.
g, 0.0f), 1.0f);
381 corrected_color.
b =
min(
max(corrected_color.
b, 0.0f), 1.0f);
382 color = &corrected_color;
395 if (render_offscreen)
397 gl_info->
gl_ops.gl.p_glScissor(draw_rect->
left, draw_rect->
top,
402 gl_info->
gl_ops.gl.p_glScissor(draw_rect->
left, drawable_height - draw_rect->
bottom,
406 gl_info->
gl_ops.gl.p_glClear(clear_mask);
414 for (
i = 0;
i < rect_count; ++
i)
419 TRACE(
"clear_rect[%u] %s, current_rect %s.\n",
i,
428 TRACE(
"Rectangle with negative dimensions, ignoring.\n");
432 if (render_offscreen)
434 gl_info->
gl_ops.gl.p_glScissor(current_rect.
left, current_rect.
top,
439 gl_info->
gl_ops.gl.p_glScissor(current_rect.
left, drawable_height - current_rect.
bottom,
444 gl_info->
gl_ops.gl.p_glClear(clear_mask);
450 &&
target->container->swapchain &&
target->container->swapchain->front_buffer ==
target->container))
451 gl_info->
gl_ops.gl.p_glFlush();
460 TRACE(
"%p increasing refcount to %u.\n",
device, refcount);
485 ERR(
"Something's still holding the recording stateblock.\n");
500 ERR(
"Device released with resources still bound.\n");
504 ERR(
"Leftover resource %p with type %s (%#x).\n",
510 ERR(
"Context array not freed!\n");
511 if (
device->hardwareCursor)
513 device->hardwareCursor = 0;
530 return device->swapchain_count;
535 TRACE(
"device %p, swapchain_idx %u.\n",
device, swapchain_idx);
537 if (swapchain_idx >=
device->swapchain_count)
539 WARN(
"swapchain_idx %u >= swapchain_count %u.\n",
540 swapchain_idx,
device->swapchain_count);
544 return device->swapchains[swapchain_idx];
570 desc.multisample_quality = 0;
573 desc.width = bm.bmWidth;
574 desc.height = bm.bmHeight;
581 ERR(
"Wine logo requested, but failed to create texture, hr %#x.\n",
hr);
591 BitBlt(dcs, 0, 0, bm.bmWidth, bm.bmHeight, dcb, 0, 0,
SRCCOPY);
624 TRACE(
"Dummy 1D texture given name %u.\n",
textures->tex_1d);
630 TRACE(
"Dummy 2D texture given name %u.\n",
textures->tex_2d);
638 TRACE(
"Dummy rectangle texture given name %u.\n",
textures->tex_rect);
647 TRACE(
"Dummy 3D texture given name %u.\n",
textures->tex_3d);
656 TRACE(
"Dummy cube texture given name %u.\n",
textures->tex_cube);
667 DWORD cube_array_data[6];
670 TRACE(
"Dummy cube array texture given name %u.\n",
textures->tex_cube_array);
673 cube_array_data[
i] =
color;
682 TRACE(
"Dummy 1D array texture given name %u.\n",
textures->tex_1d_array);
688 TRACE(
"Dummy 2D array texture given name %u.\n",
textures->tex_2d_array);
704 TRACE(
"Dummy buffer texture given name %u.\n",
textures->tex_buffer);
713 TRACE(
"Dummy multisample texture given name %u.\n",
textures->tex_2d_ms);
717 gl_info->
gl_ops.gl.p_glGenTextures(1, &
textures->tex_2d_ms_array);
718 TRACE(
"Dummy multisample array texture given name %u.\n",
textures->tex_2d_ms_array);
729 WARN(
"ARB_clear_texture is currently required to clear dummy multisample textures.\n");
763 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_cube);
766 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_3d);
769 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_rect);
771 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_2d);
772 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_1d);
776 memset(dummy_textures, 0,
sizeof(*dummy_textures));
792 desc.lod_bias = 0.0f;
793 desc.min_lod = -1000.0f;
794 desc.max_lod = 1000.0f;
795 desc.mip_base_level = 0;
796 desc.max_anisotropy = 1;
809 ERR(
"Failed to create default sampler, hr %#x.\n",
hr);
822 ERR(
"Failed to create null sampler, hr %#x.\n",
hr);
855 BOOL filter_messages;
858 TRACE(
"Setting up window %p for fullscreen mode.\n",
window);
862 ERR(
"Changing the window style for window %p, but another style (%08x, %08x) is already stored.\n",
872 TRACE(
"Old style was %08x, %08x, setting to %08x, %08x.\n",
875 filter_messages =
device->filter_messages;
882 device->filter_messages = filter_messages;
886 const RECT *window_rect)
889 BOOL filter_messages;
908 TRACE(
"Restoring window style of window %p to %08x, %08x.\n",
911 filter_messages =
device->filter_messages;
931 device->filter_messages = filter_messages;
944 ERR(
"Failed to register window %p.\n",
window);
964 BOOL ds_enable = swapchain->
desc.enable_auto_depth_stencil;
967 for (
i = 0;
i <
device->adapter->gl_info.limits.buffers; ++
i)
971 if (
device->back_buffer_view)
1002 while (
device->context_count)
1004 if (
device->contexts[0]->swapchain)
1026 device->adapter->vertex_pipe,
device->adapter->fragment_pipe)))
1028 ERR(
"Failed to allocate shader private data, hr %#x.\n",
hr);
1034 ERR(
"Failed to create CPU blitter.\n");
1055 if (!
device->swapchains[0]->num_contexts)
1064 static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
1066 DWORD clear_flags = 0;
1069 TRACE(
"device %p, swapchain_desc %p.\n",
device, swapchain_desc);
1071 if (
device->d3d_initialized)
1079 TRACE(
"Creating implicit swapchain.\n");
1081 swapchain_desc, &swapchain)))
1083 WARN(
"Failed to create implicit swapchain.\n");
1093 view_desc.
flags = 0;
1095 view_desc.
u.
texture.level_count = 1;
1097 view_desc.
u.
texture.layer_count = 1;
1101 ERR(
"Failed to create rendertarget view, hr %#x.\n",
hr);
1106 device->swapchain_count = 1;
1109 ERR(
"Out of memory!\n");
1112 device->swapchains[0] = swapchain;
1118 device->contexts[0]->last_was_rhw = 0;
1120 TRACE(
"All defaults now set up.\n");
1138 device->swapchain_count = 0;
1139 if (
device->back_buffer_view)
1153 TRACE(
"device %p, swapchain_desc %p.\n",
device, swapchain_desc);
1156 TRACE(
"Creating implicit swapchain\n");
1157 hr =
device->device_parent->ops->create_swapchain(
device->device_parent,
1158 swapchain_desc, &swapchain);
1161 WARN(
"Failed to create implicit swapchain\n");
1165 device->swapchain_count = 1;
1168 ERR(
"Out of memory!\n");
1171 device->swapchains[0] = swapchain;
1175 ERR(
"Failed to create CPU blitter.\n");
1177 device->swapchain_count = 0;
1201 if (!
device->d3d_initialized)
1206 if (
device->logo_texture)
1208 if (
device->cursor_texture)
1215#if defined(STAGING_CSMT)
1220 if (
device->fb.depth_stencil)
1224 TRACE(
"Releasing depth/stencil view %p.\n",
view);
1230 if (
device->auto_depth_stencil_view)
1236 ERR(
"Something's still holding the auto depth/stencil view (%p).\n",
view);
1239 for (
i = 0;
i <
device->adapter->gl_info.limits.buffers; ++
i)
1243 if (
device->back_buffer_view)
1249 for (
i = 0;
i <
device->swapchain_count; ++
i)
1251 TRACE(
"Releasing the implicit swapchain %u.\n",
i);
1253 FIXME(
"Something's still holding the implicit swapchain.\n");
1258 device->swapchain_count = 0;
1271 for (
i = 0;
i <
device->swapchain_count; ++
i)
1273 TRACE(
"Releasing the implicit swapchain %u.\n",
i);
1275 FIXME(
"Something's still holding the implicit swapchain.\n");
1280 device->swapchain_count = 0;
1327 TRACE(
"Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n",
1345 WARN(
"Invalid stream output %u.\n",
idx);
1350 prev_buffer =
stream->buffer;
1369 WARN(
"Invalid stream output %u.\n",
idx);
1375 return device->state.stream_output[
idx].buffer;
1384 TRACE(
"device %p, stream_idx %u, buffer %p, offset %u, stride %u.\n",
1389 WARN(
"Stream index %u out of range.\n", stream_idx);
1394 WARN(
"Offset %u is not 4 byte aligned.\n",
offset);
1399 prev_buffer =
stream->buffer;
1402 device->recording->changed.streamSource |= 1u << stream_idx;
1404 if (prev_buffer ==
buffer
1408 TRACE(
"Application is setting the old values over, nothing to do.\n");
1433 TRACE(
"device %p, stream_idx %u, buffer %p, offset %p, stride %p.\n",
1438 WARN(
"Stream index %u out of range.\n", stream_idx);
1454 UINT old_flags, old_freq;
1456 TRACE(
"device %p, stream_idx %u, divider %#x.\n",
device, stream_idx, divider);
1461 WARN(
"INSTANCEDATA and INDEXEDDATA were set, returning D3DERR_INVALIDCALL.\n");
1466 WARN(
"INSTANCEDATA used on stream 0, returning D3DERR_INVALIDCALL.\n");
1471 WARN(
"Divider is 0, returning D3DERR_INVALIDCALL.\n");
1476 old_flags =
stream->flags;
1477 old_freq =
stream->frequency;
1480 stream->frequency = divider & 0x7fffff;
1483 device->recording->changed.streamFreq |= 1u << stream_idx;
1484 else if (
stream->frequency != old_freq ||
stream->flags != old_flags)
1495 TRACE(
"device %p, stream_idx %u, divider %p.\n",
device, stream_idx, divider);
1500 TRACE(
"Returning %#x.\n", *divider);
1508 TRACE(
"device %p, state %s, matrix %p.\n",
1518 TRACE(
"Recording... not performing anything.\n");
1519 device->recording->changed.transform[d3dts >> 5] |= 1u << (d3dts & 0x1f);
1532 TRACE(
"The application is setting the same matrix over again.\n");
1562 WARN(
"Unhandled transform state %#x.\n",
state);
1594 switch (
light->type)
1601 if (
light->attenuation0 < 0.0f ||
light->attenuation1 < 0.0f ||
light->attenuation2 < 0.0f)
1603 WARN(
"Attenuation is negative, returning WINED3DERR_INVALIDCALL.\n");
1614 WARN(
"Light type out of range, returning WINED3DERR_INVALIDCALL\n");
1620 TRACE(
"Adding new light\n");
1621 if (!(
object = heap_alloc_zero(
sizeof(*
object))))
1625 object->glIndex = -1;
1626 object->OriginalIndex = light_idx;
1630 TRACE(
"Light %u setting to type %#x, diffuse %s, specular %s, ambient %s, "
1631 "position {%.8e, %.8e, %.8e}, direction {%.8e, %.8e, %.8e}, "
1632 "range %.8e, falloff %.8e, theta %.8e, phi %.8e.\n",
1640 object->OriginalParms = *
light;
1642 switch (
light->type)
1646 object->position.x =
light->position.x;
1647 object->position.y =
light->position.y;
1648 object->position.z =
light->position.z;
1649 object->position.w = 1.0f;
1650 object->cutoff = 180.0f;
1656 object->direction.x = -
light->direction.x;
1657 object->direction.y = -
light->direction.y;
1658 object->direction.z = -
light->direction.z;
1659 object->direction.w = 0.0f;
1660 object->exponent = 0.0f;
1661 object->cutoff = 180.0f;
1666 object->position.x =
light->position.x;
1667 object->position.y =
light->position.y;
1668 object->position.z =
light->position.z;
1669 object->position.w = 1.0f;
1672 object->direction.x =
light->direction.x;
1673 object->direction.y =
light->direction.y;
1674 object->direction.z =
light->direction.z;
1675 object->direction.w = 0.0f;
1683 if (!
light->falloff)
1690 object->exponent = 0.0f;
1697 object->exponent = -0.3f /
logf(
cosf(rho / 2));
1700 if (
object->exponent > 128.0f)
1701 object->exponent = 128.0f;
1708 object->position.x =
light->position.x;
1709 object->position.y =
light->position.y;
1710 object->position.z =
light->position.z;
1711 object->position.w = 1.0f;
1715 FIXME(
"Unrecognized light type %#x.\n",
light->type);
1733 TRACE(
"Light information requested but light not defined\n");
1750 TRACE(
"Light enabled requested but light not defined, so defining one!\n");
1755 FIXME(
"Adding default lights has failed dismally\n");
1775 TRACE(
"Light enabled state requested but light not defined.\n");
1788 if (plane_idx >=
device->adapter->gl_info.limits.user_clip_distances)
1790 TRACE(
"Application has requested clipplane this device doesn't support.\n");
1795 device->recording->changed.clipplane |= 1u << plane_idx;
1799 TRACE(
"Application is setting old values over, nothing to do.\n");
1803 device->update_state->clip_planes[plane_idx] = *
plane;
1816 if (plane_idx >=
device->adapter->gl_info.limits.user_clip_distances)
1818 TRACE(
"Application has requested clipplane this device doesn't support.\n");
1830 FIXME(
"device %p, clip_status %p stub!\n",
device, clip_status);
1841 FIXME(
"device %p, clip_status %p stub!\n",
device, clip_status);
1851 TRACE(
"device %p, material %p.\n",
device, material);
1853 device->update_state->material = *material;
1863 TRACE(
"device %p, material %p.\n",
device, material);
1865 *material =
device->state.material;
1879 unsigned int prev_offset;
1881 TRACE(
"device %p, buffer %p, format %s, offset %u.\n",
1884 prev_buffer =
device->update_state->index_buffer;
1885 prev_format =
device->update_state->index_format;
1886 prev_offset =
device->update_state->index_offset;
1914 return device->state.index_buffer;
1919 TRACE(
"device %p, base_index %d.\n",
device, base_index);
1921 device->update_state->base_vertex_index = base_index;
1928 return device->state.base_vertex_index;
1933 TRACE(
"device %p, viewport %p.\n",
device, viewport);
1934 TRACE(
"x %.8e, y %.8e, w %.8e, h %.8e, min_z %.8e, max_z %.8e.\n",
1937 device->update_state->viewport = *viewport;
1942 TRACE(
"Recording... not performing anything\n");
1952 TRACE(
"device %p, viewport %p.\n",
device, viewport);
1954 *viewport =
device->state.viewport;
1964 if (!(dst_texture =
state->textures[0]))
1966 dst_resource = &dst_texture->
resource;
1969 if (!(src_view =
state->fb->depth_stencil))
1980 TRACE(
"device %p, blend_state %p.\n",
device, blend_state);
1982 prev =
device->update_state->blend_state;
1983 if (prev == blend_state)
1988 device->update_state->blend_state = blend_state;
1998 return device->state.blend_state;
2006 TRACE(
"device %p, rasterizer_state %p.\n",
device, rasterizer_state);
2008 prev =
device->update_state->rasterizer_state;
2009 if (prev == rasterizer_state)
2012 if (rasterizer_state)
2014 device->update_state->rasterizer_state = rasterizer_state;
2024 return device->state.rasterizer_state;
2036 WARN(
"Unhandled render state %#x.\n",
state);
2046 TRACE(
"Recording... not performing anything.\n");
2047 device->recording->changed.renderState[
state >> 5] |= 1u << (
state & 0x1f);
2053 TRACE(
"Application is setting the old value over, nothing to do.\n");
2059 TRACE(
"RESZ multisampled depth buffer resolve triggered.\n");
2076 TRACE(
"device %p, sampler_idx %u, state %s, value %#x.\n",
2084 WARN(
"Invalid sampler %u.\n", sampler_idx);
2094 TRACE(
"Recording... not performing anything.\n");
2095 device->recording->changed.samplerState[sampler_idx] |= 1u <<
state;
2101 TRACE(
"Application is setting the old value over, nothing to do.\n");
2111 TRACE(
"device %p, sampler_idx %u, state %s.\n",
2119 WARN(
"Invalid sampler %u.\n", sampler_idx);
2123 return device->state.sampler_states[sampler_idx][
state];
2131 device->recording->changed.scissorRect =
TRUE;
2135 TRACE(
"App is setting the old scissor rectangle over, nothing to do.\n");
2142 TRACE(
"Recording... not performing anything.\n");
2165 device->recording->changed.vertexDecl =
TRUE;
2183 return device->state.vertex_declaration;
2193 device->recording->changed.vertexShader =
TRUE;
2221 WARN(
"Invalid constant buffer index %u.\n",
idx);
2250 WARN(
"Invalid constant buffer index %u.\n",
idx);
2271 WARN(
"Invalid view index %u.\n",
idx);
2275 prev =
device->update_state->shader_resource_view[
type][
idx];
2301 WARN(
"Invalid view index %u.\n",
idx);
2323 WARN(
"Invalid sampler index %u.\n",
idx);
2352 WARN(
"Invalid sampler index %u.\n",
idx);
2371 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2388 for (
i = start_idx;
i <
count + start_idx; ++
i)
2389 device->recording->changed.vertexShaderConstantsB |= (1u <<
i);
2402 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2420 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2437 for (
i = start_idx;
i <
count + start_idx; ++
i)
2438 device->recording->changed.vertexShaderConstantsI |= (1u <<
i);
2451 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2469 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2473 ||
count > d3d_info->
limits.vs_uniform_count - start_idx)
2484 memset(&
device->recording->changed.vs_consts_f[start_idx], 1,
2485 count *
sizeof(*
device->recording->changed.vs_consts_f));
2497 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2501 ||
count > d3d_info->
limits.vs_uniform_count - start_idx)
2516 device->recording->changed.pixelShader =
TRUE;
2586 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2603 for (
i = start_idx;
i <
count + start_idx; ++
i)
2604 device->recording->changed.pixelShaderConstantsB |= (1u <<
i);
2617 TRACE(
"device %p, start_idx %u, count %u,constants %p.\n",
2635 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2652 for (
i = start_idx;
i <
count + start_idx; ++
i)
2653 device->recording->changed.pixelShaderConstantsI |= (1u <<
i);
2666 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2685 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2689 ||
count > d3d_info->
limits.ps_uniform_count - start_idx)
2700 memset(&
device->recording->changed.ps_consts_f[start_idx], 1,
2701 count *
sizeof(*
device->recording->changed.ps_consts_f));
2713 TRACE(
"device %p, start_idx %u, count %u, constants %p.\n",
2717 ||
count > d3d_info->
limits.ps_uniform_count - start_idx)
3001 unsigned int initial_count)
3007 WARN(
"Invalid UAV index %u.\n",
idx);
3011 prev =
device->update_state->unordered_access_view[pipeline][
idx];
3012 if (uav == prev && initial_count == ~0
u)
3017 device->update_state->unordered_access_view[pipeline][
idx] = uav;
3029 WARN(
"Invalid UAV index %u.\n",
idx);
3033 return device->state.unordered_access_view[pipeline][
idx];
3039 TRACE(
"device %p, idx %u, uav %p, initial_count %#x.\n",
device,
idx, uav, initial_count);
3055 TRACE(
"device %p, idx %u, uav %p, initial_count %#x.\n",
device,
idx, uav, initial_count);
3069#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
3087 WARN(
" lighting state not saved yet... Some strange stuff may happen !\n");
3092 ERR(
"Source has no position mask\n");
3110 FIXME(
"Clipping is broken and disabled for now\n");
3117 box.left = dwDestIndex * vertex_size;
3118 box.right =
box.left + dwCount * vertex_size;
3121 WARN(
"Failed to map buffer, hr %#x.\n",
hr);
3124 dest_ptr = map_desc.
data;
3130 TRACE(
"View mat:\n");
3131 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat.
_11, view_mat.
_12, view_mat.
_13, view_mat.
_14);
3132 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat.
_21, view_mat.
_22, view_mat.
_23, view_mat.
_24);
3133 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat.
_31, view_mat.
_32, view_mat.
_33, view_mat.
_34);
3134 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat.
_41, view_mat.
_42, view_mat.
_43, view_mat.
_44);
3136 TRACE(
"Proj mat:\n");
3137 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat.
_11, proj_mat.
_12, proj_mat.
_13, proj_mat.
_14);
3138 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat.
_21, proj_mat.
_22, proj_mat.
_23, proj_mat.
_24);
3139 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat.
_31, proj_mat.
_32, proj_mat.
_33, proj_mat.
_34);
3140 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat.
_41, proj_mat.
_42, proj_mat.
_43, proj_mat.
_44);
3142 TRACE(
"World mat:\n");
3143 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat.
_11, world_mat.
_12, world_mat.
_13, world_mat.
_14);
3144 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat.
_21, world_mat.
_22, world_mat.
_23, world_mat.
_24);
3145 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat.
_31, world_mat.
_32, world_mat.
_33, world_mat.
_34);
3146 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat.
_41, world_mat.
_42, world_mat.
_43, world_mat.
_44);
3150 TRACE(
"viewport x %.8e, y %.8e, width %.8e, height %.8e, min_z %.8e, max_z %.8e.\n",
3158 for (
i = 0;
i < dwCount;
i+= 1) {
3159 unsigned int tex_index;
3165 const float *
p = (
const float *)(
element->data.addr +
i *
element->stride);
3167 TRACE(
"In: ( %06.2f %06.2f %06.2f )\n",
p[0],
p[1],
p[2]);
3173 rhw = (
p[0] *
mat._14) + (
p[1] *
mat._24) + (
p[2] *
mat._34) +
mat._44;
3175 TRACE(
"x=%f y=%f z=%f rhw=%f\n",
x,
y,
z, rhw);
3196 (
x <= rhw +
eps) && (
y <= rhw +
eps ) && (
z <= rhw +
eps) &&
3234 TRACE(
"Vertex got clipped\n");
3247 TRACE(
"Writing (%f %f %f) %f\n",
x,
y,
z, rhw);
3250 ( (
float *) dest_ptr)[0] =
x;
3251 ( (
float *) dest_ptr)[1] =
y;
3252 ( (
float *) dest_ptr)[2] =
z;
3253 ( (
float *) dest_ptr)[3] = rhw;
3255 dest_ptr += 3 *
sizeof(
float);
3258 dest_ptr +=
sizeof(
float);
3262 dest_ptr +=
sizeof(
DWORD);
3269 FIXME(
"Didn't expect the destination to have a normal\n");
3282 ERR(
"No diffuse color in source, but destination has one\n");
3286 *( (
DWORD *) dest_ptr) = 0xffffffff;
3287 dest_ptr +=
sizeof(
DWORD);
3305 ERR(
"No specular color in source, but destination has one\n");
3309 *(
DWORD *)dest_ptr = 0xff000000;
3310 dest_ptr +=
sizeof(
DWORD);
3318 for (tex_index = 0; tex_index < numTextures; ++tex_index)
3321 const float *tex_coord = (
const float *)(
element->data.addr +
i *
element->stride);
3324 ERR(
"No source texture, but destination requests one\n");
3353 TRACE(
"device %p, src_start_idx %u, dst_idx %u, vertex_count %u, "
3354 "dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.\n",
3359 FIXME(
"Output vertex declaration not implemented yet.\n");
3381 box.left = src_start_idx *
e->stride;
3384 ERR(
"Failed to map resource.\n");
3385 e->data.buffer_object = 0;
3399 ERR(
"Failed to unmap resource.\n");
3411 TRACE(
"device %p, stage %u, state %s, value %#x.\n",
3416 WARN(
"Invalid state %#x passed.\n",
state);
3420 if (stage >= d3d_info->
limits.ffp_blend_stages)
3422 WARN(
"Attempting to set stage %u which is higher than the max stage %u, ignoring.\n",
3423 stage, d3d_info->
limits.ffp_blend_stages - 1);
3432 TRACE(
"Recording... not performing anything.\n");
3433 device->recording->changed.textureState[stage] |= 1u <<
state;
3440 TRACE(
"Application is setting the old value over, nothing to do.\n");
3450 TRACE(
"device %p, stage %u, state %s.\n",
3455 WARN(
"Invalid state %#x passed.\n",
state);
3459 return device->state.texture_states[stage][
state];
3475 WARN(
"Ignoring invalid stage %u.\n", stage);
3481 WARN(
"Rejecting attempt to set scratch texture.\n");
3486 device->recording->changed.textures |= 1u << stage;
3488 prev =
device->update_state->textures[stage];
3489 TRACE(
"Previous texture %p.\n", prev);
3493 TRACE(
"App is setting the same texture again, nothing to do.\n");
3519 WARN(
"Ignoring invalid stage %u.\n", stage);
3523 return device->state.textures[stage];
3533 device->create_parms.device_type, caps);
3546 TRACE(
"device %p, swapchain_idx %u, mode %p, rotation %p.\n",
3569 device->recording = stateblock;
3572 TRACE(
"Recording stateblock %p.\n", stateblock);
3582 TRACE(
"device %p, stateblock %p.\n",
device, stateblock);
3586 WARN(
"Not recording.\n");
3597 TRACE(
"Returning stateblock %p.\n", *stateblock);
3610 WARN(
"Already in scene, returning WINED3DERR_INVALIDCALL.\n");
3623 WARN(
"Not in scene, returning WINED3DERR_INVALIDCALL.\n");
3636 TRACE(
"device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
3639 if (!rect_count && rects)
3641 WARN(
"Rects is %p, but rect_count is 0, ignoring clear\n", rects);
3650 WARN(
"Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
3656 if (
ds->width <
device->fb.render_targets[0]->width
3657 ||
ds->height <
device->fb.render_targets[0]->height)
3659 WARN(
"Silently ignoring depth and target clear with mismatching sizes\n");
3677 prev =
device->update_state->predicate;
3680 FIXME(
"Predicated rendering not implemented.\n");
3683 device->update_state->predicate = predicate;
3697 return device->state.predicate;
3701 unsigned int group_count_x,
unsigned int group_count_y,
unsigned int group_count_z)
3703 TRACE(
"device %p, group_count_x %u, group_count_y %u, group_count_z %u.\n",
3704 device, group_count_x, group_count_y, group_count_z);
3720 TRACE(
"device %p, primitive_type %s, patch_vertex_count %u.\n",
3724 device->state.gl_patch_vertices = patch_vertex_count;
3730 TRACE(
"device %p, primitive_type %p, patch_vertex_count %p.\n",
3731 device, primitive_type, patch_vertex_count);
3734 if (patch_vertex_count)
3735 *patch_vertex_count =
device->state.gl_patch_vertices;
3753 TRACE(
"device %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
3771 TRACE(
"device %p, start_idx %u, index_count %u.\n",
device, start_idx, index_count);
3773 if (!
device->state.index_buffer)
3779 WARN(
"Called without a valid index buffer set, returning WINED3DERR_INVALIDCALL.\n");
3784 device->state.base_vertex_index, start_idx, index_count, 0, 0,
TRUE);
3790 UINT start_idx,
UINT index_count,
UINT start_instance,
UINT instance_count)
3792 TRACE(
"device %p, start_idx %u, index_count %u, start_instance %u, instance_count %u.\n",
3793 device, start_idx, index_count, start_instance, instance_count);
3796 device->state.base_vertex_index, start_idx, index_count, start_instance, instance_count,
TRUE);
3811 unsigned int src_size, dst_size, src_skip_levels = 0;
3812 unsigned int src_level_count, dst_level_count;
3813 unsigned int layer_count, level_count,
i,
j;
3818 TRACE(
"device %p, src_texture %p, dst_texture %p.\n",
device, src_texture, dst_texture);
3821 if (!src_texture || !dst_texture)
3823 WARN(
"Source and destination textures must be non-NULL, returning WINED3DERR_INVALIDCALL.\n");
3830 WARN(
"Source resource is GPU accessible or a scratch resource.\n");
3835 WARN(
"Destination resource is CPU accessible.\n");
3843 WARN(
"Source and destination have different types, returning WINED3DERR_INVALIDCALL.\n");
3850 WARN(
"Source and destination have different layer counts.\n");
3856 WARN(
"Source and destination formats do not match.\n");
3862 level_count =
min(src_level_count, dst_level_count);
3868 src_size =
max(src_size, src_texture->
resource.depth);
3869 dst_size =
max(dst_size, dst_texture->
resource.depth);
3871 while (src_size > dst_size)
3881 WARN(
"Source and destination dimensions do not match.\n");
3886 for (
i = 0;
i < level_count; ++
i)
3893 for (
j = 0;
j < layer_count; ++
j)
3897 &src_texture->
resource,
j * src_level_count +
i + src_skip_levels, &
box,
3911 TRACE(
"device %p, num_passes %p.\n",
device, num_passes);
3917 WARN(
"Sampler state %u has minfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n",
i);
3922 WARN(
"Sampler state %u has magfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n",
i);
3931 WARN(
"Non-filterable texture and mag filter enabled on sampler %u, returning E_FAIL\n",
i);
3936 WARN(
"Non-filterable texture and min filter enabled on sampler %u, returning E_FAIL\n",
i);
3942 WARN(
"Non-filterable texture and mip filter enabled on sampler %u, returning E_FAIL\n",
i);
3955 WARN(
"Depth stencil is smaller than the color buffer, returning D3DERR_CONFLICTINGRENDERSTATE\n");
3963 TRACE(
"returning D3D_OK\n");
3969 TRACE(
"device %p, software %#x.\n",
device, software);
3971 device->softwareVertexProcessing = software;
3978 return device->softwareVertexProcessing;
3986 TRACE(
"device %p, swapchain_idx %u, raster_status %p.\n",
3987 device, swapchain_idx, raster_status);
3999 TRACE(
"device %p, segments %.8e.\n",
device, segments);
4001 if (segments != 0.0f)
4005 FIXME(
"device %p, segments %.8e stub!\n",
device, segments);
4031 TRACE(
"device %p, dst_buffer %p, offset %u, uav %p.\n",
4050 TRACE(
"device %p, dst_resource %p, src_resource %p.\n",
device, dst_resource, src_resource);
4052 if (src_resource == dst_resource)
4054 WARN(
"Source and destination are the same resource.\n");
4058 if (src_resource->
type != dst_resource->
type)
4060 WARN(
"Resource types (%s / %s) don't match.\n",
4066 if (src_resource->
width != dst_resource->
width
4068 || src_resource->
depth != dst_resource->
depth)
4070 WARN(
"Resource dimensions (%ux%ux%u / %ux%ux%u) don't match.\n",
4076 if (src_resource->
format->typeless_id != dst_resource->
format->typeless_id
4077 || (!src_resource->
format->typeless_id && src_resource->
format->id != dst_resource->
format->id))
4079 WARN(
"Resource formats %s and %s are incompatible.\n",
4099 WARN(
"Subresource layouts (%ux%u / %ux%u) don't match.\n",
4122 struct wined3d_resource *dst_resource,
unsigned int dst_sub_resource_idx,
unsigned int dst_x,
4123 unsigned int dst_y,
unsigned int dst_z,
struct wined3d_resource *src_resource,
4124 unsigned int src_sub_resource_idx,
const struct wined3d_box *src_box)
4128 TRACE(
"device %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
4129 "src_resource %p, src_sub_resource_idx %u, src_box %s.\n",
4130 device, dst_resource, dst_sub_resource_idx, dst_x, dst_y, dst_z,
4131 src_resource, src_sub_resource_idx,
debug_box(src_box));
4133 if (src_resource == dst_resource && src_sub_resource_idx == dst_sub_resource_idx)
4135 WARN(
"Source and destination are the same sub-resource.\n");
4139 if (src_resource->
type != dst_resource->
type)
4141 WARN(
"Resource types (%s / %s) don't match.\n",
4147 if (src_resource->
format->typeless_id != dst_resource->
format->typeless_id
4148 || (!src_resource->
format->typeless_id && src_resource->
format->id != dst_resource->
format->id))
4150 WARN(
"Resource formats %s and %s are incompatible.\n",
4158 if (dst_sub_resource_idx)
4160 WARN(
"Invalid dst_sub_resource_idx %u.\n", dst_sub_resource_idx);
4164 if (src_sub_resource_idx)
4166 WARN(
"Invalid src_sub_resource_idx %u.\n", src_sub_resource_idx);
4174 dst_w = dst_resource->
size - dst_x;
4178 else if ((src_box->
left >= src_box->
right
4186 if (src_box->
right > src_resource->
size || dst_x >= dst_resource->
size
4187 || src_box->
right - src_box->
left > dst_resource->
size - dst_x)
4189 WARN(
"Invalid range specified, dst_offset %u, src_offset %u, size %u.\n",
4200 unsigned int src_level = src_sub_resource_idx % src_texture->
level_count;
4204 WARN(
"Invalid destination sub-resource %u.\n", dst_sub_resource_idx);
4210 WARN(
"Invalid source sub-resource %u.\n", src_sub_resource_idx);
4214#if !defined(STAGING_CSMT)
4215 if (dst_texture->
sub_resources[dst_sub_resource_idx].map_count)
4217 WARN(
"Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
4221 if (src_texture->
sub_resources[src_sub_resource_idx].map_count)
4223 WARN(
"Source sub-resource %u is mapped.\n", src_sub_resource_idx);
4226 if (dst_texture->
sub_resources[dst_sub_resource_idx].map_count ||
4231 if (dst_texture->
sub_resources[dst_sub_resource_idx].map_count ||
4234 WARN(
"Destination or source sub-resource is mapped.\n");
4242 unsigned int src_w, src_h, dst_w, dst_h, dst_level;
4247 dst_level = dst_sub_resource_idx % dst_texture->
level_count;
4261 dst_y + (src_box->
bottom - src_box->
top), 0, 1);
4263 dst_sub_resource_idx % dst_texture->
level_count, &dst_box)))
4282 unsigned int sub_resource_idx,
const struct wined3d_box *
box,
const void *
data,
unsigned int row_pitch,
4283 unsigned int depth_pitch)
4288 TRACE(
"device %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u.\n",
4293 if (sub_resource_idx > 0)
4295 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
4309 if (sub_resource_idx >=
texture->level_count *
texture->layer_count)
4311 WARN(
"Invalid sub_resource_idx %u.\n", sub_resource_idx);
4339#if !defined(STAGING_CSMT)
4352 unsigned int dst_level, src_level;
4353 RECT dst_rect, src_rect;
4355 TRACE(
"device %p, dst_resource %p, dst_sub_resource_idx %u, "
4356 "src_resource %p, src_sub_resource_idx %u, format %s.\n",
4357 device, dst_resource, dst_sub_resource_idx,
4363 FIXME(
"Unhandled multisample resolve, dst_format %s, src_format %s, format %s.\n",
4382 dst_level = dst_sub_resource_idx % dst_texture->
level_count;
4385 src_level = src_sub_resource_idx % src_texture->
level_count;
4399 TRACE(
"device %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
4412 if (
view->layer_count > 1)
4414 FIXME(
"Layered clears not implemented.\n");
4448 unsigned int view_idx)
4450 TRACE(
"device %p, view_idx %u.\n",
device, view_idx);
4452 if (view_idx >=
device->adapter->gl_info.limits.buffers)
4454 WARN(
"Only %u render targets are supported.\n",
device->adapter->gl_info.limits.buffers);
4458 return device->fb.render_targets[view_idx];
4465 return device->fb.depth_stencil;
4473 TRACE(
"device %p, view_idx %u, view %p, set_viewport %#x.\n",
4476 if (view_idx >=
device->adapter->gl_info.limits.buffers)
4478 WARN(
"Only %u render targets are supported.\n",
device->adapter->gl_info.limits.buffers);
4484 WARN(
"View resource %p doesn't have render target usage.\n",
view->resource);
4491 if (!view_idx && set_viewport)
4495 state->viewport.x = 0;
4496 state->viewport.y = 0;
4499 state->viewport.min_z = 0.0f;
4500 state->viewport.max_z = 1.0f;
4508 prev =
device->fb.render_targets[view_idx];
4530 prev =
device->fb.depth_stencil;
4533 TRACE(
"Trying to do a NOP SetRenderTarget operation.\n");
4547 unsigned int texture_level = sub_resource_idx % cursor_image->
level_count;
4556 ERR(
"Failed to map source texture.\n");
4567 desc.multisample_quality = 0;
4580 ERR(
"Failed to create cursor texture.\n");
4590 unsigned int texture_level = sub_resource_idx %
texture->level_count;
4591 unsigned int cursor_width, cursor_height;
4596 TRACE(
"device %p, x_hotspot %u, y_hotspot %u, texture %p, sub_resource_idx %u.\n",
4599 if (sub_resource_idx >=
texture->level_count *
texture->layer_count
4603 if (
device->cursor_texture)
4611 WARN(
"Texture %p has invalid format %s.\n",
4618 ERR(
"Failed to get display mode, hr %#x.\n",
hr);
4624 if (cursor_width >
mode.width || cursor_height >
mode.height)
4626 WARN(
"Texture %p, sub-resource %u dimensions are %ux%u, but screen dimensions are %ux%u.\n",
4627 texture, sub_resource_idx, cursor_width, cursor_height,
mode.width,
mode.height);
4639 ERR(
"Failed to create cursor texture.\n");
4643 if (cursor_width == 32 && cursor_height == 32)
4645 UINT mask_size = cursor_width * cursor_height / 8;
4655 memset(mask_bits, 0xff, mask_size);
4672 if (
device->hardwareCursor)
4675 if (
device->bCursorVisible)
4681 TRACE(
"New cursor dimensions are %ux%u.\n", cursor_width, cursor_height);
4682 device->cursorWidth = cursor_width;
4683 device->cursorHeight = cursor_height;
4684 device->xHotSpot = x_hotspot;
4685 device->yHotSpot = y_hotspot;
4691 int x_screen_space,
int y_screen_space,
DWORD flags)
4693 TRACE(
"device %p, x %d, y %d, flags %#x.\n",
4696 device->xScreenSpace = x_screen_space;
4697 device->yScreenSpace = y_screen_space;
4699 if (
device->hardwareCursor)
4704 if (x_screen_space ==
pt.x && y_screen_space ==
pt.y)
4710 if (x_screen_space !=
pt.x || y_screen_space !=
pt.y)
4714 device->hardwareCursor = 0;
4729 if (show && !oldVisible)
4737 if (
device->hardwareCursor)
4739 device->bCursorVisible = show;
4745 else if (
device->cursor_texture)
4747 device->bCursorVisible = show;
4778 BOOL backbuffer_resized;
4782 TRACE(
"device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
4789 ERR(
"Failed to get the first implicit swapchain.\n");
4795 if (
device->logo_texture)
4800 if (
device->cursor_texture)
4808 for (
i = 0;
i <
device->adapter->gl_info.limits.buffers; ++
i)
4824 TRACE(
"New params:\n");
4854 swapchain->
desc.flags = swapchain_desc->
flags;
4862 TRACE(
"Changing the device window from %p to %p.\n",
4872 if (!swapchain_desc->
windowed != !swapchain->
desc.windowed
4874 || (!swapchain_desc->
windowed && backbuffer_resized))
4879 else if (!swapchain_desc->
windowed)
4893 device->exStyle = exStyle;
4901 if (
device->auto_depth_stencil_view)
4906 if (swapchain->
desc.enable_auto_depth_stencil)
4912 TRACE(
"Creating the depth stencil buffer.\n");
4922 texture_desc.
depth = 1;
4923 texture_desc.
size = 0;
4931 ERR(
"Failed to create the auto depth/stencil surface, hr %#x.\n",
hr);
4936 view_desc.
flags = 0;
4938 view_desc.
u.
texture.level_count = 1;
4940 view_desc.
u.
texture.layer_count = 1;
4946 ERR(
"Failed to create rendertarget view, hr %#x.\n",
hr);
4953 if (
device->back_buffer_view)
4963 view_desc.
flags = 0;
4965 view_desc.
u.
texture.level_count = 1;
4967 view_desc.
u.
texture.layer_count = 1;
4971 ERR(
"Failed to create rendertarget view, hr %#x.\n",
hr);
4980 TRACE(
"Resetting stateblock.\n");
4989 if (
device->d3d_initialized)
5001 else if (
device->back_buffer_view)
5009 state->viewport.x = 0;
5010 state->viewport.y = 0;
5019 if (
device->d3d_initialized)
5034 TRACE(
"device %p, enable_dialogs %#x.\n",
device, enable_dialogs);
5036 if (!enable_dialogs)
FIXME(
"Dialogs cannot be disabled yet.\n");
5045 TRACE(
"device %p, parameters %p.\n",
device, parameters);
5047 *parameters =
device->create_parms;
5062 TRACE(
"device %p, swapchain_idx %u, flags %#x, ramp %p.\n",
5074 TRACE(
"device %p, swapchain_idx %u, ramp %p.\n",
5107 if (
device->d3d_initialized)
5109 for (
i = 0;
i <
device->adapter->gl_info.limits.buffers; ++
i)
5112 ERR(
"Resource %p is still in use as render target %u.\n",
resource,
i);
5116 ERR(
"Resource %p is still in use as depth/stencil buffer.\n",
resource);
5130 ERR(
"Texture %p is still in use, stage %u.\n",
texture,
i);
5136 ERR(
"Texture %p is still in use by recording stateblock %p, stage %u.\n",
5151 ERR(
"Buffer %p is still in use, stream %u.\n",
buffer,
i);
5157 ERR(
"Buffer %p is still in use by stateblock %p, stream %u.\n",
5165 ERR(
"Buffer %p is still in use as index buffer.\n",
buffer);
5171 ERR(
"Buffer %p is still in use by stateblock %p as index buffer.\n",
5185 TRACE(
"Resource released.\n");
5209 device->device_parent = device_parent;
5212 device->surface_alignment = surface_alignment;
5215 device->create_parms.adapter_idx = adapter_idx;
5217 device->create_parms.focus_window = focus_window;
5222 vertex_pipeline =
adapter->vertex_pipe;
5233 ERR(
"Failed to compile state table, hr %#x.\n",
hr);
5245 WARN(
"Failed to create command stream.\n");
5275 for (
i = 0;
i <
device->context_count; ++
i)
5280 for (
i = 0;
i <
device->context_count; ++
i)
5297 TRACE(
"Filtering message: window %p, message %#x, wparam %#lx, lparam %#lx.\n",
5311 ERR(
"Window %p is not the focus window for device %p.\n",
window,
device);
5313 else if (
message == WM_DISPLAYCHANGE)
5315 device->device_parent->ops->mode_changed(
device->device_parent);
5321 for (
i = 0;
i <
device->swapchain_count;
i++)
5342#if defined(STAGING_CSMT)
5348 struct wined3d_gl_bo *
ret;
5351 TRACE(
"device %p, size %u, gl_usage %u, type_hint %u\n",
device,
size, gl_usage,
5357 ret->type_hint = type_hint;
5359 ret->usage = gl_usage;
5371 TRACE(
"Successfully created and set up buffer %u\n",
ret->name);
5377 struct wined3d_gl_bo *bo)
5380 TRACE(
"device %p, bo %p, GL bo %u\n",
device, bo, bo->name);
5392 TRACE(
"device %p, bo %p, GL bo %u\n",
device, bo, bo->name);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
static void * heap_realloc(void *mem, size_t len)
void wined3d_arbfp_blitter_create(struct wined3d_blitter **next, const struct wined3d_device *device)
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
void wined3d_cs_emit_set_light(struct wined3d_cs *cs, const struct wined3d_light_info *light)
void wined3d_cs_destroy(struct wined3d_cs *cs)
void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value)
void wined3d_cs_emit_set_light_enable(struct wined3d_cs *cs, unsigned int idx, BOOL enable)
void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader)
void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material)
void wined3d_cs_emit_set_scissor_rect(struct wined3d_cs *cs, const RECT *rect)
void wined3d_cs_emit_set_stream_source(struct wined3d_cs *cs, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride)
void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration)
void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, UINT sampler_idx, struct wined3d_sampler *sampler)
void wined3d_cs_emit_set_constant_buffer(struct wined3d_cs *cs, enum wined3d_shader_type type, UINT cb_idx, struct wined3d_buffer *buffer)
void wined3d_cs_emit_clear_unordered_access_view_uint(struct wined3d_cs *cs, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value)
void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, enum wined3d_sampler_state state, DWORD value)
void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, struct wined3d_rasterizer_state *rasterizer_state)
void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, 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)
void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport)
void wined3d_cs_emit_draw_indirect(struct wined3d_cs *cs, GLenum primitive_type, unsigned int patch_vertex_count, struct wined3d_buffer *buffer, unsigned int offset, BOOL indexed)
void wined3d_cs_emit_draw(struct wined3d_cs *cs, GLenum 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)
void wined3d_cs_emit_reset_state(struct wined3d_cs *cs)
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture)
void wined3d_cs_emit_dispatch_indirect(struct wined3d_cs *cs, struct wined3d_buffer *buffer, unsigned int offset)
void wined3d_cs_emit_set_blend_state(struct wined3d_cs *cs, struct wined3d_blend_state *state)
void wined3d_cs_emit_blt_sub_resource(struct wined3d_cs *cs, 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, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
void wined3d_cs_emit_flush(struct wined3d_cs *cs)
void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, enum wined3d_pipeline pipeline, unsigned int view_idx, struct wined3d_unordered_access_view *view, unsigned int initial_count)
void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
void wined3d_cs_emit_clear_rendertarget_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view, const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
void wined3d_cs_emit_set_stream_output(struct wined3d_cs *cs, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset)
void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type, UINT view_idx, struct wined3d_shader_resource_view *view)
void wined3d_cs_emit_dispatch(struct wined3d_cs *cs, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z)
void wined3d_cs_emit_set_rendertarget_view(struct wined3d_cs *cs, unsigned int view_idx, struct wined3d_rendertarget_view *view)
void wined3d_cs_init_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
void wined3d_cs_emit_set_predication(struct wined3d_cs *cs, struct wined3d_query *predicate, BOOL value)
void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view)
struct wined3d_cs * wined3d_cs_create(struct wined3d_device *device)
void wined3d_cs_emit_set_stream_source_freq(struct wined3d_cs *cs, UINT stream_idx, UINT frequency, UINT flags)
void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane)
void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, enum wined3d_texture_stage_state state, DWORD value)
DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN
void multiply_matrix(D3DMATRIX *dst, const D3DMATRIX *src1, const D3DMATRIX *src2) DECLSPEC_HIDDEN
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num)
void state_init(void *ipp)
HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wined3d *wined3d, UINT adapter, D3DDEVTYPE device_type, HWND focus_window, DWORD flags, D3DPRESENT_PARAMETERS *parameters)
ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info, unsigned int unit)
BOOL context_set_current(struct wined3d_context *ctx)
void context_invalidate_compute_state(struct wined3d_context *context, DWORD state_id)
void context_destroy(struct wined3d_device *device, struct wined3d_context *context)
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_state *state, UINT rt_count, const struct wined3d_fb_state *fb)
void context_invalidate_state(struct wined3d_context *context, DWORD state)
void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, const struct wined3d_state *state, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info)
void context_bind_dummy_textures(const struct wined3d_device *device, const struct wined3d_context *context)
void context_release(struct wined3d_context *context)
void CDECL wined3d_device_set_cs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view)
void CDECL wined3d_device_set_hull_shader(struct wined3d_device *device, struct wined3d_shader *shader)
static struct wined3d_texture * wined3d_device_create_cursor_texture(struct wined3d_device *device, struct wined3d_texture *cursor_image, unsigned int sub_resource_idx)
HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device, unsigned int view_idx, struct wined3d_rendertarget_view *view, BOOL set_viewport)
void CDECL wined3d_device_set_ps_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view)
void CDECL wined3d_device_set_stream_output(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer, UINT offset)
struct wined3d_shader_resource_view *CDECL wined3d_device_get_cs_resource_view(const struct wined3d_device *device, unsigned int idx)
HRESULT CDECL wined3d_device_set_light_enable(struct wined3d_device *device, UINT light_idx, BOOL enable)
void CDECL wined3d_device_set_vertex_declaration(struct wined3d_device *device, struct wined3d_vertex_declaration *declaration)
HRESULT CDECL wined3d_device_set_vs_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software)
HRESULT CDECL wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider)
struct wined3d_rendertarget_view *CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device, unsigned int view_idx)
void CDECL wined3d_device_set_vs_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view)
HRESULT CDECL wined3d_device_get_stream_source_freq(const struct wined3d_device *device, UINT stream_idx, UINT *divider)
static BOOL is_full_clear(const struct wined3d_texture *texture, unsigned int sub_resource_idx, const RECT *draw_rect, const RECT *clear_rect)
#define copy_and_next(dest, src, size)
void CDECL wined3d_device_draw_indexed_primitive_instanced(struct wined3d_device *device, UINT start_idx, UINT index_count, UINT start_instance, UINT instance_count)
void CDECL wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *parameters)
static HRESULT wined3d_device_create_primary_opengl_context(struct wined3d_device *device)
void CDECL wined3d_device_dispatch_compute(struct wined3d_device *device, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z)
void CDECL wined3d_device_set_gs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler)
BOOL CDECL wined3d_device_get_software_vertex_processing(const struct wined3d_device *device)
void CDECL wined3d_device_setup_fullscreen_window(struct wined3d_device *device, HWND window, UINT w, UINT h)
void CDECL wined3d_device_set_vs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer)
void CDECL wined3d_device_set_base_vertex_index(struct wined3d_device *device, INT base_index)
struct wined3d_shader *CDECL wined3d_device_get_domain_shader(const struct wined3d_device *device)
void CDECL wined3d_device_set_pixel_shader(struct wined3d_device *device, struct wined3d_shader *shader)
HRESULT CDECL wined3d_device_acquire_focus_window(struct wined3d_device *device, HWND window)
HRESULT CDECL wined3d_device_get_clip_status(const struct wined3d_device *device, struct wined3d_clip_status *clip_status)
void CDECL wined3d_device_set_material(struct wined3d_device *device, const struct wined3d_material *material)
void CDECL wined3d_device_resolve_sub_resource(struct wined3d_device *device, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, enum wined3d_format_id format_id)
struct wined3d_buffer *CDECL wined3d_device_get_gs_cb(const struct wined3d_device *device, UINT idx)
static void create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context)
static HRESULT process_vertices_strided(const struct wined3d_device *device, DWORD dwDestIndex, DWORD dwCount, const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, DWORD flags, DWORD DestFVF)
void CDECL wined3d_device_set_transform(struct wined3d_device *device, enum wined3d_transform_state d3dts, const struct wined3d_matrix *matrix)
void CDECL wined3d_device_set_scissor_rect(struct wined3d_device *device, const RECT *rect)
static struct wined3d_buffer * wined3d_device_get_constant_buffer(const struct wined3d_device *device, enum wined3d_shader_type shader_type, unsigned int idx)
HRESULT CDECL wined3d_device_get_vs_consts_b(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, BOOL *constants)
struct wined3d_buffer *CDECL wined3d_device_get_vs_cb(const struct wined3d_device *device, UINT idx)
void CDECL wined3d_device_update_sub_resource(struct wined3d_device *device, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch)
void CDECL wined3d_device_set_vertex_shader(struct wined3d_device *device, struct wined3d_shader *shader)
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
HRESULT CDECL wined3d_device_set_ps_consts_f(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants)
DWORD CDECL wined3d_device_get_render_state(const struct wined3d_device *device, enum wined3d_render_state state)
void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
static void destroy_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
struct wined3d_shader_resource_view *CDECL wined3d_device_get_vs_resource_view(const struct wined3d_device *device, UINT idx)
HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count)
void CDECL wined3d_device_set_ps_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler)
HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *device, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box)
struct wined3d_sampler *CDECL wined3d_device_get_ps_sampler(const struct wined3d_device *device, UINT idx)
HRESULT CDECL wined3d_device_set_clip_status(struct wined3d_device *device, const struct wined3d_clip_status *clip_status)
HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
void CDECL wined3d_device_set_compute_shader(struct wined3d_device *device, struct wined3d_shader *shader)
HRESULT CDECL wined3d_device_begin_stateblock(struct wined3d_device *device)
HRESULT CDECL wined3d_device_get_vs_consts_i(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, struct wined3d_ivec4 *constants)
HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, const struct wined3d_vertex_declaration *declaration, DWORD flags, DWORD dst_fvf)
static void wined3d_device_set_pipeline_unordered_access_view(struct wined3d_device *device, enum wined3d_pipeline pipeline, unsigned int idx, struct wined3d_unordered_access_view *uav, unsigned int initial_count)
HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture)
struct wined3d_buffer *CDECL wined3d_device_get_ds_cb(const struct wined3d_device *device, unsigned int idx)
void CDECL wined3d_device_set_cs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer)
struct wined3d_sampler *CDECL wined3d_device_get_ds_sampler(const struct wined3d_device *device, unsigned int idx)
UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device)
void CDECL wined3d_device_copy_uav_counter(struct wined3d_device *device, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
void CDECL wined3d_device_multiply_transform(struct wined3d_device *device, enum wined3d_transform_state state, const struct wined3d_matrix *matrix)
static void wined3d_device_create_primary_opengl_context_cs(void *object)
static enum wined3d_primitive_type d3d_primitive_type_from_gl(GLenum primitive_type)
struct wined3d_shader *CDECL wined3d_device_get_pixel_shader(const struct wined3d_device *device)
HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view, const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
void CDECL wined3d_device_get_scissor_rect(const struct wined3d_device *device, RECT *rect)
void CDECL wined3d_device_set_hs_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view)
void CDECL wined3d_device_set_blend_state(struct wined3d_device *device, struct wined3d_blend_state *blend_state)
void CDECL wined3d_device_set_geometry_shader(struct wined3d_device *device, struct wined3d_shader *shader)
ULONG CDECL wined3d_device_decref(struct wined3d_device *device)
void CDECL wined3d_device_set_hs_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer)
void CDECL wined3d_device_set_vs_sampler(struct wined3d_device *device, UINT idx, struct wined3d_sampler *sampler)
struct wined3d_shader *CDECL wined3d_device_get_geometry_shader(const struct wined3d_device *device)
HRESULT CDECL wined3d_device_get_stream_source(const struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer **buffer, UINT *offset, UINT *stride)
void CDECL wined3d_device_copy_resource(struct wined3d_device *device, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource)
void device_invalidate_state(const struct wined3d_device *device, DWORD state)
static void wined3d_device_set_shader_resource_view(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, struct wined3d_shader_resource_view *view)
void CDECL wined3d_device_clear_unordered_access_view_uint(struct wined3d_device *device, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value)
void CDECL wined3d_device_set_ds_resource_view(struct wined3d_device *device, unsigned int idx, struct wined3d_shader_resource_view *view)
BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context)
struct wined3d_rasterizer_state *CDECL wined3d_device_get_rasterizer_state(struct wined3d_device *device)
HRESULT CDECL wined3d_device_get_vs_consts_f(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, struct wined3d_vec4 *constants)
HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode, wined3d_device_reset_cb callback, BOOL reset_state)
struct wined3d_query *CDECL wined3d_device_get_predication(struct wined3d_device *device, BOOL *value)
DWORD CDECL wined3d_device_get_sampler_state(const struct wined3d_device *device, UINT sampler_idx, enum wined3d_sampler_state state)
void CDECL wined3d_device_set_gs_resource_view(struct wined3d_device *device, UINT idx, struct wined3d_shader_resource_view *view)
void CDECL wined3d_device_restore_fullscreen_window(struct wined3d_device *device, HWND window, const RECT *window_rect)
HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device, UINT x_hotspot, UINT y_hotspot, struct wined3d_texture *texture, unsigned int sub_resource_idx)
HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture)
struct wined3d_shader *CDECL wined3d_device_get_compute_shader(const struct wined3d_device *device)
void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource)
HRESULT CDECL wined3d_device_set_dialog_box_mode(struct wined3d_device *device, BOOL enable_dialogs)
void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device)
float CDECL wined3d_device_get_npatch_mode(const struct wined3d_device *device)
static void wined3d_device_set_constant_buffer(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, struct wined3d_buffer *buffer)
struct wined3d_unordered_access_view *CDECL wined3d_device_get_unordered_access_view(const struct wined3d_device *device, unsigned int idx)
HRESULT CDECL wined3d_device_get_clip_plane(const struct wined3d_device *device, UINT plane_idx, struct wined3d_vec4 *plane)
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
static LONG fullscreen_style(LONG style)
void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb, UINT rect_count, const RECT *clear_rect, const RECT *draw_rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil)
struct wined3d_sampler *CDECL wined3d_device_get_cs_sampler(const struct wined3d_device *device, unsigned int idx)
HRESULT CDECL wined3d_device_get_ps_consts_i(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, struct wined3d_ivec4 *constants)
void CDECL wined3d_device_set_sampler_state(struct wined3d_device *device, UINT sampler_idx, enum wined3d_sampler_state state, DWORD value)
BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
void CDECL wined3d_device_set_index_buffer(struct wined3d_device *device, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
void CDECL wined3d_device_set_cs_sampler(struct wined3d_device *device, unsigned int idx, struct wined3d_sampler *sampler)
HRESULT CDECL wined3d_device_get_light(const struct wined3d_device *device, UINT light_idx, struct wined3d_light *light)
INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device)
static void destroy_dummy_textures(struct wined3d_device *device, struct wined3d_context *context)
struct wined3d_buffer *CDECL wined3d_device_get_hs_cb(const struct wined3d_device *device, unsigned int idx)
void CDECL wined3d_device_draw_primitive_instanced(struct wined3d_device *device, UINT start_vertex, UINT vertex_count, UINT start_instance, UINT instance_count)
static void wined3d_device_delete_opengl_contexts(struct wined3d_device *device)
struct wined3d_buffer *CDECL wined3d_device_get_index_buffer(const struct wined3d_device *device, enum wined3d_format_id *format, unsigned int *offset)
void CDECL wined3d_device_set_predication(struct wined3d_device *device, struct wined3d_query *predicate, BOOL value)
void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view)
HRESULT CDECL wined3d_device_set_light(struct wined3d_device *device, UINT light_idx, const struct wined3d_light *light)
HRESULT CDECL wined3d_device_draw_primitive(struct wined3d_device *device, UINT start_vertex, UINT vertex_count)
void CDECL wined3d_device_release_focus_window(struct wined3d_device *device)
void CDECL wined3d_device_set_viewport(struct wined3d_device *device, const struct wined3d_viewport *viewport)
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, DWORD *num_passes)
HRESULT CDECL wined3d_device_set_vs_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
void device_context_remove(struct wined3d_device *device, struct wined3d_context *context)
void CDECL wined3d_device_draw_indexed_primitive_instanced_indirect(struct wined3d_device *device, struct wined3d_buffer *buffer, unsigned int offset)
void CDECL wined3d_device_set_unordered_access_view(struct wined3d_device *device, unsigned int idx, struct wined3d_unordered_access_view *uav, unsigned int initial_count)
struct wined3d_unordered_access_view *CDECL wined3d_device_get_cs_uav(const struct wined3d_device *device, unsigned int idx)
void CDECL wined3d_device_set_ds_sampler(struct wined3d_device *device, unsigned int idx, struct wined3d_sampler *sampler)
struct wined3d_shader_resource_view *CDECL wined3d_device_get_hs_resource_view(const struct wined3d_device *device, unsigned int idx)
void CDECL wined3d_device_set_rasterizer_state(struct wined3d_device *device, struct wined3d_rasterizer_state *rasterizer_state)
struct wined3d_shader *CDECL wined3d_device_get_hull_shader(const struct wined3d_device *device)
struct wined3d_rendertarget_view *CDECL wined3d_device_get_depth_stencil_view(const struct wined3d_device *device)
static void device_resource_remove(struct wined3d_device *device, struct wined3d_resource *resource)
static struct wined3d_unordered_access_view * wined3d_device_get_pipeline_unordered_access_view(const struct wined3d_device *device, enum wined3d_pipeline pipeline, unsigned int idx)
static struct wined3d_shader_resource_view * wined3d_device_get_shader_resource_view(const struct wined3d_device *device, enum wined3d_shader_type shader_type, unsigned int idx)
const struct wined3d_light WINED3D_default_light
void CDECL wined3d_device_set_texture_stage_state(struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state, DWORD value)
static struct wined3d_sampler * wined3d_device_get_sampler(const struct wined3d_device *device, enum wined3d_shader_type shader_type, unsigned int idx)
void CDECL wined3d_device_set_hs_sampler(struct wined3d_device *device, unsigned int idx, struct wined3d_sampler *sampler)
void CDECL wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value)
void CDECL wined3d_device_set_gs_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer)
struct wined3d_sampler *CDECL wined3d_device_get_gs_sampler(const struct wined3d_device *device, UINT idx)
void CDECL wined3d_device_set_cs_uav(struct wined3d_device *device, unsigned int idx, struct wined3d_unordered_access_view *uav, unsigned int initial_count)
struct wined3d_shader_resource_view *CDECL wined3d_device_get_gs_resource_view(const struct wined3d_device *device, UINT idx)
void CDECL wined3d_device_set_ps_cb(struct wined3d_device *device, UINT idx, struct wined3d_buffer *buffer)
void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device, int x_screen_space, int y_screen_space, DWORD flags)
HRESULT CDECL wined3d_device_set_clip_plane(struct wined3d_device *device, UINT plane_idx, const struct wined3d_vec4 *plane)
void CDECL wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, DWORD flags, const struct wined3d_gamma_ramp *ramp)
struct wined3d_swapchain *CDECL wined3d_device_get_swapchain(const struct wined3d_device *device, UINT swapchain_idx)
static void device_free_sampler(struct wine_rb_entry *entry, void *context)
void CDECL wined3d_device_set_primitive_type(struct wined3d_device *device, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count)
void CDECL wined3d_device_get_material(const struct wined3d_device *device, struct wined3d_material *material)
struct wined3d_sampler *CDECL wined3d_device_get_vs_sampler(const struct wined3d_device *device, UINT idx)
struct wined3d *CDECL wined3d_device_get_wined3d(const struct wined3d_device *device)
static void device_leftover_sampler(struct wine_rb_entry *entry, void *context)
HRESULT CDECL wined3d_device_set_ps_consts_i(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const struct wined3d_ivec4 *constants)
void CDECL wined3d_device_draw_primitive_instanced_indirect(struct wined3d_device *device, struct wined3d_buffer *buffer, unsigned int offset)
HRESULT CDECL wined3d_device_init_gdi(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc)
struct wined3d_sampler *CDECL wined3d_device_get_hs_sampler(const struct wined3d_device *device, unsigned int idx)
HRESULT CDECL wined3d_device_uninit_gdi(struct wined3d_device *device)
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource)
HRESULT CDECL wined3d_device_get_ps_consts_b(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, BOOL *constants)
GLenum gl_primitive_type_from_d3d(enum wined3d_primitive_type primitive_type)
void CDECL wined3d_device_set_ds_cb(struct wined3d_device *device, unsigned int idx, struct wined3d_buffer *buffer)
HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride)
static void device_load_logo(struct wined3d_device *device, const char *filename)
static void create_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
void CDECL wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp)
static LONG fullscreen_exstyle(LONG exstyle)
static void device_init_swapchain_state(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
DWORD CDECL wined3d_device_get_texture_stage_state(const struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state)
void CDECL wined3d_device_dispatch_compute_indirect(struct wined3d_device *device, struct wined3d_buffer *buffer, unsigned int offset)
struct wined3d_buffer *CDECL wined3d_device_get_ps_cb(const struct wined3d_device *device, UINT idx)
void CDECL wined3d_device_get_viewport(const struct wined3d_device *device, struct wined3d_viewport *viewport)
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
static void wined3d_device_set_sampler(struct wined3d_device *device, enum wined3d_shader_type type, UINT idx, struct wined3d_sampler *sampler)
ULONG CDECL wined3d_device_incref(struct wined3d_device *device)
void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device, enum wined3d_primitive_type *primitive_type, unsigned int *patch_vertex_count)
struct wined3d_shader *CDECL wined3d_device_get_vertex_shader(const struct wined3d_device *device)
struct wined3d_texture *CDECL wined3d_device_get_texture(const struct wined3d_device *device, UINT stage)
struct wined3d_shader_resource_view *CDECL wined3d_device_get_ps_resource_view(const struct wined3d_device *device, UINT idx)
static void wined3d_device_delete_opengl_contexts_cs(void *object)
struct wined3d_shader_resource_view *CDECL wined3d_device_get_ds_resource_view(const struct wined3d_device *device, unsigned int idx)
struct wined3d_blend_state *CDECL wined3d_device_get_blend_state(const struct wined3d_device *device)
HRESULT CDECL wined3d_device_end_stateblock(struct wined3d_device *device, struct wined3d_stateblock **stateblock)
static void resolve_depth_buffer(struct wined3d_device *device)
HRESULT CDECL wined3d_device_get_ps_consts_f(const struct wined3d_device *device, unsigned int start_idx, unsigned int count, struct wined3d_vec4 *constants)
static int wined3d_sampler_compare(const void *key, const struct wine_rb_entry *entry)
HRESULT CDECL wined3d_device_set_ps_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants)
HRESULT CDECL wined3d_device_get_display_mode(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
struct wined3d_buffer *CDECL wined3d_device_get_stream_output(struct wined3d_device *device, UINT idx, UINT *offset)
HRESULT CDECL wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments)
struct wined3d_buffer *CDECL wined3d_device_get_cs_cb(const struct wined3d_device *device, unsigned int idx)
HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc)
void CDECL wined3d_device_set_domain_shader(struct wined3d_device *device, struct wined3d_shader *shader)
UINT CDECL wined3d_device_get_swapchain_count(const struct wined3d_device *device)
HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
struct wined3d_vertex_declaration *CDECL wined3d_device_get_vertex_declaration(const struct wined3d_device *device)
HRESULT CDECL wined3d_device_get_light_enable(const struct wined3d_device *device, UINT light_idx, BOOL *enable)
HRESULT CDECL wined3d_device_get_raster_status(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_raster_status *raster_status)
HRESULT CDECL wined3d_device_set_vs_consts_b(struct wined3d_device *device, unsigned int start_idx, unsigned int count, const BOOL *constants)
void CDECL wined3d_device_get_transform(const struct wined3d_device *device, enum wined3d_transform_state state, struct wined3d_matrix *matrix)
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps)
ULONG CDECL wined3d_query_incref(struct wined3d_query *query)
ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
HRESULT CDECL wined3d_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags)
ULONG CDECL wined3d_shader_incref(struct wined3d_shader *shader)
const float wined3d_srgb_const0[]
ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
const float wined3d_srgb_const1[]
ULONG CDECL wined3d_blend_state_incref(struct wined3d_blend_state *state)
const struct StateEntryTemplate misc_state_template[]
ULONG CDECL wined3d_blend_state_decref(struct wined3d_blend_state *state)
ULONG CDECL wined3d_rasterizer_state_incref(struct wined3d_rasterizer_state *state)
ULONG CDECL wined3d_rasterizer_state_decref(struct wined3d_rasterizer_state *state)
HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_multistate_funcs, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, const struct wined3d_vertex_pipe_ops *vertex, const struct fragment_pipeline *fragment, const struct StateEntryTemplate *misc)
void wined3d_fbo_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info)
struct wined3d_blitter * wined3d_cpu_blitter_create(void)
void wined3d_raw_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info)
void wined3d_ffp_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info)
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
HRESULT wined3d_texture_check_box_dimensions(const struct wined3d_texture *texture, unsigned int level, const struct wined3d_box *box)
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
struct wined3d_texture *__cdecl wined3d_texture_from_resource(struct wined3d_resource *resource)
BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct wined3d_resource_desc *desc, UINT layer_count, UINT level_count, DWORD flags, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
ULONG CDECL wined3d_texture_incref(struct wined3d_texture *texture)
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
HRESULT CDECL wined3d_texture_set_color_key(struct wined3d_texture *texture, DWORD flags, const struct wined3d_color_key *color_key)
HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, const RECT *dst_rect, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
void wined3d_texture_validate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
const char * debug_box(const struct wined3d_box *box)
const char * debug_ivec4(const struct wined3d_ivec4 *v)
const char * debug_d3dformat(enum wined3d_format_id format_id)
const char * debug_d3dtexturestate(enum wined3d_texture_stage_state state)
const char * debug_d3dsamplerstate(enum wined3d_sampler_state state)
const char * debug_vec4(const struct wined3d_vec4 *v)
const char * debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
const char * debug_d3dtstype(enum wined3d_transform_state tstype)
const char * debug_uvec4(const struct wined3d_uvec4 *v)
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
const char * debug_d3drenderstate(enum wined3d_render_state state)
const char * debug_color(const struct wined3d_color *color)
ULONG CDECL wined3d_unordered_access_view_decref(struct wined3d_unordered_access_view *view)
ULONG CDECL wined3d_shader_resource_view_incref(struct wined3d_shader_resource_view *view)
HRESULT CDECL wined3d_rendertarget_view_create(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 wined3d_rendertarget_view_get_drawable_size(const struct wined3d_rendertarget_view *view, const struct wined3d_context *context, unsigned int *width, unsigned int *height)
ULONG CDECL wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view)
ULONG CDECL wined3d_unordered_access_view_incref(struct wined3d_unordered_access_view *view)
ULONG CDECL wined3d_rendertarget_view_decref(struct wined3d_rendertarget_view *view)
ULONG CDECL wined3d_shader_resource_view_decref(struct wined3d_shader_resource_view *view)
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define HeapFree(x, y, z)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Delta *Height) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Delta)
#define InterlockedExchangePointer(Target, Value)
double pow(double x, double y)
GLint GLint GLsizei GLsizei GLsizei depth
#define GL_TEXTURE_CUBE_MAP
#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei GLenum type
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
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X
GLdouble GLdouble GLdouble r
#define GL_STENCIL_BUFFER_BIT
#define GL_UNSIGNED_INT_8_8_8_8
#define GL_TRIANGLE_STRIP
GLint GLint GLsizei width
#define GL_DEPTH_BUFFER_BIT
#define GL_TRIANGLE_STRIP_ADJACENCY_ARB
GLboolean GLboolean GLboolean b
#define GL_TEXTURE_BUFFER
#define GL_LINE_STRIP_ADJACENCY_ARB
#define GL_STENCIL_TEST_TWO_SIDE_EXT
#define GL_TEXTURE_1D_ARRAY
#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY
#define GL_TEXTURE_2D_MULTISAMPLE
#define GL_LINES_ADJACENCY_ARB
#define GL_TRIANGLES_ADJACENCY_ARB
#define GL_TEXTURE_RECTANGLE_ARB
#define GL_TEXTURE_CUBE_MAP_ARRAY
#define GL_ELEMENT_ARRAY_BUFFER
#define GL_TEXTURE_2D_ARRAY
GLubyte GLubyte GLubyte GLubyte w
GLint GLfloat GLint stencil
GLfloat GLfloat GLfloat GLfloat h
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
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
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
_Check_return_ float __cdecl logf(_In_ float x)
_Check_return_ float __cdecl cosf(_In_ float x)
#define InterlockedCompareExchangePointer
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static IPrintDialogCallback callback
static const WCHAR desc[]
static const BYTE ramp[17]
static IHTMLWindow2 * window
static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos)
static float(__cdecl *square_half_float)(float x
ULONG CDECL wined3d_sampler_incref(struct wined3d_sampler *sampler)
HRESULT CDECL wined3d_sampler_create(struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler)
ULONG CDECL wined3d_sampler_decref(struct wined3d_sampler *sampler)
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
static void * heap_calloc(SIZE_T count, SIZE_T size)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
static void wine_rb_destroy(struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context)
#define WINE_RB_ENTRY_VALUE(element, type, field)
static void wine_rb_init(struct wine_rb_tree *tree, wine_rb_compare_func_t compare)
static void wine_rb_clear(struct wine_rb_tree *tree, wine_rb_traverse_func_t *callback, void *context)
DWORD MaxVertexBlendMatrixIndex
const struct StateEntryTemplate * states
struct wined3d_resource resource
const struct wined3d_gl_info * gl_info
unsigned int sub_resource_idx
struct wined3d_d3d_limits limits
DWORD wined3d_creation_flags
struct wined3d_rendertarget_view * depth_stencil
struct wined3d_rendertarget_view * render_targets[MAX_RENDER_TARGET_VIEWS]
BOOL supported[WINED3D_GL_EXT_COUNT]
struct opengl_funcs gl_ops
struct wined3d_light OriginalParms
struct wined3d_color specular
struct wined3d_color ambient
struct wined3d_color diffuse
struct wined3d_color emissive
struct wined3d_resource * resource
const struct wined3d_format * format
unsigned int sub_resource_idx
enum wined3d_resource_type resource_type
enum wined3d_multisample_type multisample_type
unsigned int multisample_quality
enum wined3d_format_id format
enum wined3d_resource_type type
unsigned int format_flags
struct list resource_list_entry
const struct wined3d_format * format
BOOL strict_draw_ordering
struct list shader_list_entry
struct wined3d_state state
struct wined3d_texture * container
DWORD multisample_quality
BOOL auto_restore_display_mode
enum wined3d_multisample_type multisample_type
enum wined3d_format_id auto_depth_stencil_format
enum wined3d_format_id backbuffer_format
enum wined3d_swap_effect swap_effect
BOOL enable_auto_depth_stencil
struct wined3d_texture ** back_buffers
struct wined3d_swapchain_desc desc
struct wined3d_swapchain * swapchain
struct wined3d_resource resource
struct wined3d_texture::wined3d_texture_sub_resource sub_resources[1]
const struct StateEntryTemplate * vp_states
struct wined3d_view_desc::@3680::@3682 texture
enum wined3d_format_id format_id
union wined3d_view_desc::@3680 u
struct wined3d_adapter adapters[1]
ULONG CDECL wined3d_decref(struct wined3d *wined3d)
ULONG CDECL wined3d_incref(struct wined3d *wined3d)
const struct wined3d_parent_ops wined3d_null_parent_ops
HRESULT CDECL wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
HRESULT CDECL wined3d_get_device_caps(const struct wined3d *wined3d, UINT adapter_idx, enum wined3d_device_type device_type, WINED3DCAPS *caps)
void wined3d_state_enable_light(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info, struct wined3d_light_info *light_info, BOOL enable)
void state_cleanup(struct wined3d_state *state)
void stateblock_init_contained_states(struct wined3d_stateblock *stateblock)
struct wined3d_light_info * wined3d_state_get_light(const struct wined3d_state *state, unsigned int idx)
void state_unbind_resources(struct wined3d_state *state)
ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
HRESULT CDECL wined3d_stateblock_create(struct wined3d_device *device, enum wined3d_stateblock_type type, struct wined3d_stateblock **stateblock)
HRESULT CDECL wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain, DWORD flags, const struct wined3d_gamma_ramp *ramp)
void swapchain_update_swap_interval(struct wined3d_swapchain *swapchain)
HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain, struct wined3d_raster_status *raster_status)
void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window)
HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapchain, unsigned int buffer_count, unsigned int width, unsigned int height, enum wined3d_format_id format_id, enum wined3d_multisample_type multisample_type, unsigned int multisample_quality)
ULONG CDECL wined3d_swapchain_decref(struct wined3d_swapchain *swapchain)
HRESULT CDECL wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *swapchain, struct wined3d_gamma_ramp *ramp)
HRESULT CDECL wined3d_swapchain_set_fullscreen(struct wined3d_swapchain *swapchain, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode)
void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain)
HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate)
ULONG CDECL wined3d_vertex_declaration_incref(struct wined3d_vertex_declaration *declaration)
ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration)
#define WINED3DERR_UNSUPPORTEDTEXTUREFILTER
#define WINED3DCLEAR_TARGET
#define WINED3D_TS_WORLD_MATRIX(index)
@ WINED3D_MULTISAMPLE_NONE
#define WINED3DVERTEXTEXTURESAMPLER3
#define WINED3DFVF_SPECULAR
@ WINED3D_RS_STENCILENABLE
@ WINED3D_RS_ZWRITEENABLE
@ WINED3D_RS_TWOSIDEDSTENCILMODE
@ WINED3D_RS_STENCILWRITEMASK
#define WINED3D_MAP_NO_DIRTY_UPDATE
@ WINED3D_PT_LINESTRIP_ADJ
@ WINED3D_PT_TRIANGLELIST_ADJ
@ WINED3D_PT_LINELIST_ADJ
@ WINED3D_PT_TRIANGLESTRIP_ADJ
@ WINED3D_PT_TRIANGLESTRIP
@ WINED3D_PT_TRIANGLELIST
#define WINED3D_RESZ_CODE
#define WINED3DFVF_TEXCOUNT_SHIFT
@ WINED3D_SWAP_EFFECT_COPY
@ WINED3D_SWAP_EFFECT_SEQUENTIAL
@ WINED3D_SWAP_EFFECT_DISCARD
@ WINED3D_SAMP_MIN_FILTER
@ WINED3D_SAMP_MIP_FILTER
@ WINED3D_SAMP_MAG_FILTER
#define WINED3D_MAX_STREAM_OUTPUT_BUFFERS
#define WINED3D_RESOURCE_ACCESS_GPU
#define WINED3D_RESOURCE_ACCESS_CPU
#define WINED3DFVF_DIFFUSE
#define WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR
@ WINED3D_RTYPE_TEXTURE_2D
@ WINED3D_RTYPE_TEXTURE_1D
@ WINED3D_RTYPE_TEXTURE_3D
#define WINED3DFVF_POSITION_MASK
#define WINED3DSTREAMSOURCE_INSTANCEDATA
@ WINED3D_LIGHT_PARALLELPOINT
@ WINED3D_LIGHT_DIRECTIONAL
#define WINED3D_HANDLE_RESTORE
#define WINED3D_SWAPCHAIN_GDI_COMPATIBLE
wined3d_texture_stage_state
#define WINED3DSTREAMSOURCE_INDEXEDDATA
#define WINED3D_CKEY_SRC_BLT
#define WINED3DFVF_TEXCOUNT_MASK
#define WINED3DFVF_XYZRHW
#define WINED3DFVF_NORMAL
@ WINED3DFMT_B8G8R8A8_UNORM
@ WINED3DFMT_B5G6R5_UNORM
#define WINED3D_TEXTURE_CREATE_MAPPABLE
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)
#define WINED3DCLEAR_STENCIL
#define WINED3D_MAP_WRITE
#define WINED3DUSAGE_SCRATCH
#define WINED3DCLEAR_ZBUFFER
#define WINED3DUSAGE_RENDERTARGET
#define WINED3D_HIGHEST_TEXTURE_STATE
#define WINED3DUSAGE_DYNAMIC
#define WINEDDERR_SURFACEBUSY
#define WINED3DERR_INVALIDCALL
#define WINED3D_TEXTURE_CREATE_GET_DC
#define WINED3DVERTEXTEXTURESAMPLER0
#define WINEHIGHEST_RENDER_STATE
#define WINED3DUSAGE_DEPTHSTENCIL
static enum wined3d_render_state WINED3D_RS_COLORWRITE(int index)
HRESULT(CDECL * wined3d_device_reset_cb)(struct wined3d_resource *resource)
#define WINED3DERR_CONFLICTINGRENDERSTATE
@ ARB_TEXTURE_BUFFER_OBJECT
@ ARB_TEXTURE_MULTISAMPLE
@ ARB_TEXTURE_CUBE_MAP_ARRAY
BOOL wined3d_register_window(HWND window, struct wined3d_device *device)
void wined3d_unregister_window(HWND window)
static BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
static unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture, unsigned int level)
#define MAX_SAMPLER_OBJECTS
@ WINED3D_PUSH_CONSTANTS_PS_B
@ WINED3D_PUSH_CONSTANTS_VS_B
@ WINED3D_PUSH_CONSTANTS_VS_I
@ WINED3D_PUSH_CONSTANTS_PS_F
@ WINED3D_PUSH_CONSTANTS_PS_I
@ WINED3D_PUSH_CONSTANTS_VS_F
#define MAX_FRAGMENT_SAMPLERS
static unsigned int wined3d_texture_get_level_pow2_height(const struct wined3d_texture *texture, unsigned int level)
#define MAX_CONSTANT_BUFFERS
static unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture, unsigned int level)
#define HIGHEST_TRANSFORMSTATE
#define WINED3D_STATE_INIT_DEFAULT
static struct wined3d_surface * wined3d_rendertarget_view_get_surface(const struct wined3d_rendertarget_view *view)
#define MAX_UNORDERED_ACCESS_VIEWS
static BOOL use_software_vertex_processing(const struct wined3d_device *device)
static unsigned int wined3d_texture_get_level_pow2_width(const struct wined3d_texture *texture, unsigned int level)
#define LIGHTMAP_HASHFUNC(x)
#define STATE_IS_COMPUTE(a)
#define MAX_RENDER_TARGETS
static BOOL wined3d_resource_access_is_managed(unsigned int access)
@ WINED3D_PIPELINE_COMPUTE
@ WINED3D_PIPELINE_GRAPHICS
static BOOL needs_srgb_write(const struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_fb_state *fb)
#define WINED3D_MAX_CONSTS_B
#define WINED3D_LOCATION_DRAWABLE
@ WINED3D_SHADER_TYPE_HULL
@ WINED3D_SHADER_TYPE_PIXEL
@ WINED3D_SHADER_TYPE_GEOMETRY
@ WINED3D_SHADER_TYPE_DOMAIN
@ WINED3D_SHADER_TYPE_COMPUTE
@ WINED3D_SHADER_TYPE_VERTEX
static void wined3d_from_cs(const struct wined3d_cs *cs)
#define WINED3DCREATE_MULTITHREADED
#define WINED3D_MAX_CONSTS_I
#define MAX_SHADER_RESOURCE_VIEWS
#define STATE_INDEXBUFFER
#define MAX_COMBINED_SAMPLERS
static void wined3d_not_from_cs(struct wined3d_cs *cs)
#define WINED3DFMT_FLAG_FILTERING
#define WINED3DFMT_FLAG_DEPTH
static void wined3d_resource_wait_idle(struct wined3d_resource *resource)
static BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
@ WINED3D_CS_QUEUE_DEFAULT
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)
static unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture, unsigned int level)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
BOOL WINAPI DeleteDC(_In_ HDC)
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
BOOL WINAPI DestroyCursor(_In_ HCURSOR)
LRESULT WINAPI DefWindowProcW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define LR_CREATEDIBSECTION
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
BOOL WINAPI IntersectRect(_Out_ LPRECT, _In_ LPCRECT, _In_ LPCRECT)
HANDLE WINAPI LoadImageA(_In_opt_ HINSTANCE hInst, _In_ LPCSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)