72 { 1.0f, 1.0f, 1.0f, 0.0f },
73 { 0.0f, 0.0f, 0.0f, 0.0f },
74 { 0.0f, 0.0f, 0.0f, 0.0f },
90 if (!
device->shader_backend->shader_allocate_context_data(
context))
92 ERR(
"Failed to allocate shader backend context data.\n");
97 if (!
device->adapter->fragment_pipe->allocate_context_data(
context))
99 ERR(
"Failed to allocate fragment pipeline context data.\n");
104 if (!(new_array =
realloc(
device->contexts,
sizeof(*new_array) * (
device->context_count + 1))))
106 ERR(
"Failed to grow the context array.\n");
113 device->contexts = new_array;
129 for (
i = 0;
i <
device->context_count; ++
i)
140 ERR(
"Context %p doesn't exist in context array.\n",
context);
144 if (!--
device->context_count)
154 ERR(
"Failed to shrink context array. Oh well.\n");
158 device->contexts = new_array;
165 TRACE(
"%p increasing refcount to %u.\n",
device, refcount);
188 ERR(
"Leftover rasterizer state %p.\n",
state);
195 ERR(
"Leftover blend state %p.\n", blend_state);
202 ERR(
"Leftover depth/stencil state %p.\n",
state);
209 if (
device->swapchain_count)
224 ERR(
"Device released with resources still bound.\n");
228 ERR(
"Leftover resource %p with type %s (%#x).\n",
234 ERR(
"Context array not freed!\n");
235 if (
device->hardwareCursor)
237 device->hardwareCursor = 0;
255 TRACE(
"%p decreasing refcount to %u.\n",
device, refcount);
260 device->adapter->adapter_ops->adapter_destroy_device(
device);
272 TRACE(
"%p increasing refcount to %u.\n",
state, refcount);
279 TRACE(
"object %p.\n",
object);
289 TRACE(
"%p decreasing refcount to %u.\n",
state, refcount);
293 state->parent_ops->wined3d_object_destroyed(
state->parent);
305 return state->parent;
319 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, state %p.\n",
322 if (!(
object =
calloc(1,
sizeof(*
object))))
325 object->refcount = 1;
326 object->desc = *
desc;
331 object->dual_source =
desc->rt[0].enable
337 TRACE(
"Created blend state %p.\n",
object);
354 TRACE(
"object %p.\n",
object);
364 TRACE(
"%p decreasing refcount to %u.\n",
state, refcount);
368 state->parent_ops->wined3d_object_destroyed(
state->parent);
380 return state->parent;
392 if (
desc->depth &&
desc->depth_write)
395 if (
desc->stencil &&
desc->stencil_write_mask)
410 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, state %p.\n",
413 if (!(
object =
calloc(1,
sizeof(*
object))))
416 object->refcount = 1;
417 object->desc = *
desc;
424 TRACE(
"Created depth/stencil state %p.\n",
object);
441 TRACE(
"object %p.\n",
object);
451 TRACE(
"%p decreasing refcount to %u.\n",
state, refcount);
455 state->parent_ops->wined3d_object_destroyed(
state->parent);
467 return state->parent;
476 TRACE(
"device %p, desc %p, parent %p, parent_ops %p, state %p.\n",
479 if (!(
object =
calloc(1,
sizeof(*
object))))
482 object->refcount = 1;
483 object->desc = *
desc;
488 TRACE(
"Created rasterizer state %p.\n",
object);
498 return device->swapchain_count;
503 TRACE(
"device %p, swapchain_idx %u.\n",
device, swapchain_idx);
505 if (swapchain_idx >=
device->swapchain_count)
507 WARN(
"swapchain_idx %u >= swapchain_count %u.\n",
508 swapchain_idx,
device->swapchain_count);
512 return device->swapchains[swapchain_idx];
538 desc.multisample_quality = 0;
549 ERR(
"Wine logo requested, but failed to create texture, hr %#lx.\n",
hr);
593 TRACE(
"Dummy 1D texture given name %u.\n",
textures->tex_1d);
599 TRACE(
"Dummy 2D texture given name %u.\n",
textures->tex_2d);
607 TRACE(
"Dummy 3D texture given name %u.\n",
textures->tex_3d);
616 TRACE(
"Dummy cube texture given name %u.\n",
textures->tex_cube);
627 DWORD cube_array_data[6];
630 TRACE(
"Dummy cube array texture given name %u.\n",
textures->tex_cube_array);
633 cube_array_data[
i] =
color;
641 TRACE(
"Dummy 1D array texture given name %u.\n",
textures->tex_1d_array);
647 TRACE(
"Dummy 2D array texture given name %u.\n",
textures->tex_2d_array);
663 TRACE(
"Dummy buffer texture given name %u.\n",
textures->tex_buffer);
672 TRACE(
"Dummy multisample texture given name %u.\n",
textures->tex_2d_ms);
676 gl_info->
gl_ops.gl.p_glGenTextures(1, &
textures->tex_2d_ms_array);
677 TRACE(
"Dummy multisample array texture given name %u.\n",
textures->tex_2d_ms_array);
688 WARN(
"ARB_clear_texture is currently required to clear dummy multisample textures.\n");
723 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_cube);
726 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_3d);
728 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_2d);
729 gl_info->
gl_ops.gl.p_glDeleteTextures(1, &dummy_textures->
tex_1d);
733 memset(dummy_textures, 0,
sizeof(*dummy_textures));
749 desc.lod_bias = 0.0f;
750 desc.min_lod = -1000.0f;
751 desc.max_lod = 1000.0f;
752 desc.mip_base_level = 0;
753 desc.max_anisotropy = 1;
766 ERR(
"Failed to create default sampler, hr %#lx.\n",
hr);
779 ERR(
"Failed to create null sampler, hr %#lx.\n",
hr);
793 VkCommandBuffer vk_command_buffer,
VkImageType type,
unsigned int layer_count,
unsigned int sample_count)
801 TRACE(
"image %p, context_vk %p, vk_command_buffer %p, type %#x, layer_count %u, sample_count %u.\n",
802 image, context_vk, vk_command_buffer,
type, layer_count, sample_count);
809 1, 1, 1, sample_count, 1, layer_count,
flags,
image))
817 range.baseMipLevel = 0;
818 range.levelCount = 1;
819 range.baseArrayLayer = 0;
820 range.layerCount = layer_count;
833 TRACE(
"Created NULL image 0x%s, memory 0x%s.\n",
846 VkCommandBuffer vk_command_buffer;
847 unsigned int sample_count = 2;
851 while (sample_count && !(sample_count &
format->multisample_types))
856 ERR(
"Failed to get command buffer.\n");
868 r->buffer_info.buffer =
r->bo.vk_buffer;
869 r->buffer_info.offset =
r->bo.b.buffer_offset;
870 r->buffer_info.range =
r->bo.size;
874 ERR(
"Failed to create 1D image.\n");
880 ERR(
"Failed to create 2D image.\n");
886 ERR(
"Failed to create 2D MSAA image.\n");
892 ERR(
"Failed to create 3D image.\n");
899 if (
r->image_2dms.vk_image)
901 if (
r->image_2d.vk_image)
903 if (
r->image_1d.vk_image)
943 buffer_create_info.
flags = 0;
944 buffer_create_info.buffer =
r->bo.vk_buffer;
946 buffer_create_info.offset =
r->bo.b.buffer_offset;
947 buffer_create_info.range =
r->bo.size;
950 &buffer_create_info,
NULL, &
v->vk_view_buffer_uint))) < 0)
959 &buffer_create_info,
NULL, &
v->vk_view_buffer_float))) < 0)
969 view_desc.image =
r->image_1d.vk_image;
988 view_desc.
pNext = &usage_desc;
1010 view_desc.image =
r->image_2d.vk_image;
1021 view_desc.image =
r->image_2dms.vk_image;
1032 view_desc.image =
r->image_3d.vk_image;
1043 view_desc.image =
r->image_2d.vk_image;
1066 view_desc.image =
r->image_2dms.vk_image;
1077 view_desc.image =
r->image_2d.vk_image;
1092 if (
v->vk_info_cube_array.imageView)
1094 if (
v->vk_info_2d_array.imageView)
1096 if (
v->vk_info_cube.imageView)
1098 if (
v->vk_info_3d.imageView)
1100 if (
v->vk_info_2dms.imageView)
1102 if (
v->vk_info_2d.imageView)
1104 if (
v->vk_info_1d_array.imageView)
1106 if (
v->vk_info_1d.imageView)
1108 if (
v->vk_view_buffer_float)
1135 unsigned int screensaver_active;
1141 ERR(
"Failed to register window %p.\n",
window);
1148 if ((
device->restore_screensaver = !!screensaver_active))
1160 if (
device->restore_screensaver)
1170 BOOL ds_enable = swapchain->
state.desc.enable_auto_depth_stencil;
1173 if (
device->back_buffer_view)
1174 views[0] =
device->back_buffer_view;
1176 device->adapter->d3d_info.limits.max_rt_count, views, !!
device->back_buffer_view);
1187 TRACE(
"allocator %p, context %p, memory_type %u, chunk_size %Iu.\n",
allocator,
context, memory_type, chunk_size);
1193 if (!(chunk_gl =
malloc(
sizeof(*chunk_gl))))
1211 return &chunk_gl->
c;
1227 if (chunk_gl->
c.map_ptr)
1305 TRACE(
"Allocated offset %#Ix from chunk %p.\n",
block->offset,
block->chunk);
1344 TRACE(
"device_gl %p, context_gl %p, size %Iu, binding %#x, usage %#x, coherent %#x, flags %#x, bo %p.\n",
1365 buffer_offset =
memory->offset;
1366 else if (!context_gl)
1367 WARN_(d3d_perf)(
"Failed to suballocate buffer from the client thread.\n");
1369 else if (context_gl)
1371 WARN_(d3d_perf)(
"Not allocating chunk memory for binding type %#x.\n",
binding);
1383 WARN(
"Failed to allocate buffer.\n");
1398 TRACE(
"Created buffer object %u.\n",
id);
1419 bo->
b.coherent = coherent;
1422 bo->
b.buffer_offset = buffer_offset;
1423 bo->
b.memory_offset = bo->
b.buffer_offset;
1424 bo->
b.map_ptr =
NULL;
1425 bo->
b.client_map_count = 0;
1439 TRACE(
"device %p.\n", device_gl);
1454 if (context_gl->
c.d3d_info->fences)
1464 while (
device->context_count)
1486 TRACE(
"device %p.\n", device_gl);
1489 swapchain =
device->swapchains[0];
1493 WARN(
"Failed to acquire context.\n");
1501 WARN(
"Failed to initialise allocator.\n");
1508 device->adapter->vertex_pipe,
device->adapter->fragment_pipe)))
1510 ERR(
"Failed to allocate shader private data, hr %#lx.\n",
hr);
1519 ERR(
"Failed to create CPU blitter.\n");
1539 static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f};
1542 DWORD clear_flags = 0;
1546 TRACE(
"device %p, swapchain %p.\n",
device, swapchain);
1548 if (
device->d3d_initialized)
1551 device->swapchain_count = 1;
1554 ERR(
"Failed to allocate swapchain array.\n");
1558 device->swapchains[0] = swapchain;
1571 swapchain_desc = &swapchain->
state.desc;
1578 view_desc.
flags = 0;
1580 view_desc.
u.
texture.level_count = 1;
1582 view_desc.
u.
texture.layer_count = 1;
1586 ERR(
"Failed to create rendertarget view, hr %#lx.\n",
hr);
1587 device->adapter->adapter_ops->adapter_uninit_3d(
device);
1595 TRACE(
"All defaults now set up.\n");
1598 if (
device->back_buffer_view)
1613 device->swapchain_count = 0;
1673 if (!
device->d3d_initialized)
1675 ERR(
"Called while 3D support was not initialised.\n");
1681 device->swapchain_count = 0;
1718 device->adapter->adapter_ops->adapter_uninit_3d(
device);
1721 if ((
view =
device->auto_depth_stencil_view))
1725 ERR(
"Something's still holding the auto depth/stencil view (%p).\n",
view);
1760 driver_info = &
device->adapter->driver_info;
1762 TRACE(
"Emulating 0x%s bytes. 0x%s used, returning 0x%s left.\n",
1777 WARN(
"Invalid stream output %u.\n",
idx);
1783 return context->state->stream_output[
idx].buffer;
1791 TRACE(
"context %p, stream_idx %u, buffer %p, offset %p, stride %p.\n",
1796 WARN(
"Stream index %u out of range.\n", stream_idx);
1812 FIXME(
"device %p, clip_status %p stub!\n",
device, clip_status);
1823 FIXME(
"device %p, clip_status %p stub!\n",
device, clip_status);
1841 return state->index_buffer;
1860 struct wined3d_color *blend_factor,
unsigned int *sample_mask)
1868 return state->blend_state;
1879 return state->depth_stencil_state;
1887 return context->state->rasterizer_state;
1891 unsigned int *rect_count,
RECT *rects)
1896 TRACE(
"context %p, rect_count %p, rects %p.\n",
context, rect_count, rects);
1898 if (rects && (
count = rect_count ?
min(*rect_count,
state->scissor_rect_count) : 1))
1901 *rect_count =
state->scissor_rect_count;
1966 return device->cs->c.state;
1981 return context->state->vertex_declaration;
2026 WARN(
"Invalid constant buffer index %u, count %u.\n", start_idx,
count);
2056 TRACE(
"context %p, blend_state %p, blend_factor %p, sample_mask %#x.\n",
2057 context, blend_state, blend_factor, sample_mask);
2060 prev =
state->blend_state;
2061 if (prev == blend_state && !
memcmp(blend_factor, &
state->blend_factor,
sizeof(*blend_factor))
2062 && sample_mask ==
state->sample_mask)
2067 state->blend_state = blend_state;
2068 state->blend_factor = *blend_factor;
2069 state->sample_mask = sample_mask;
2083 TRACE(
"context %p, depth_stencil_state %p, stencil_ref %u.\n",
context, depth_stencil_state, stencil_ref);
2086 prev =
state->depth_stencil_state;
2087 if (prev == depth_stencil_state &&
state->stencil_ref == stencil_ref)
2090 if (depth_stencil_state)
2092 state->depth_stencil_state = depth_stencil_state;
2093 state->stencil_ref = stencil_ref;
2107 TRACE(
"context %p, rasterizer_state %p.\n",
context, rasterizer_state);
2110 prev =
state->rasterizer_state;
2111 if (prev == rasterizer_state)
2114 if (rasterizer_state)
2116 state->rasterizer_state = rasterizer_state;
2155 TRACE(
"context %p, rect_count %u, rects %p.\n",
context, rect_count, rects);
2157 for (
i = 0;
i < rect_count; ++
i)
2163 if (
state->scissor_rect_count == rect_count
2164 && !
memcmp(
state->scissor_rects, rects, rect_count *
sizeof(*rects)))
2166 TRACE(
"App is setting the old scissor rectangles over, nothing to do.\n");
2171 memcpy(
state->scissor_rects, rects, rect_count *
sizeof(*rects));
2174 state->scissor_rect_count = rect_count;
2194 TRACE(
"context %p, type %#x, start_idx %u, count %u, views %p.\n",
context,
type, start_idx,
count, views);
2198 WARN(
"Invalid view index %u, count %u.\n", start_idx,
count);
2206 memcpy(real_views, views,
count *
sizeof(*views));
2215 WARN(
"Application is trying to bind resource which is attached as render target.\n");
2216 real_views[
i] =
NULL;
2253 WARN(
"Invalid sampler index %u, count %u.\n", start_idx,
count);
2284 TRACE(
"context %p, pipeline %#x, start_idx %u, count %u, uavs %p, initial_counts %p.\n",
2285 context, pipeline, start_idx,
count, uavs, initial_counts);
2289 WARN(
"Invalid UAV index %u, count %u.\n", start_idx,
count);
2294 if (!
memcmp(uavs, &
state->unordered_access_view[pipeline][start_idx],
count *
sizeof(*uavs)) && !initial_counts)
2305 state->unordered_access_view[pipeline][start_idx +
i] = uav;
2319 if (rtv_count != ~0
u)
2323 WARN(
"View resource %p has incompatible %s bind flags.\n",
2329 render_target_views,
FALSE)))
2335 if (uav_count != ~0
u)
2338 unordered_access_views, initial_counts);
2354 if (
resource->srv_bind_count_device)
2369 WARN(
"Application sets bound resource as render target.\n");
2381 unsigned int i, max_rt_count;
2383 TRACE(
"context %p, start_idx %u, count %u, views %p, set_viewport %#x.\n",
2386 max_rt_count =
context->device->adapter->d3d_info.limits.max_rt_count;
2387 if (start_idx >= max_rt_count)
2389 WARN(
"Only %u render targets are supported.\n", max_rt_count);
2398 WARN(
"View resource %p doesn't have render target bind flags.\n", views[
i]->
resource);
2407 if (!start_idx && set_viewport)
2409 state->viewports[0].x = 0;
2410 state->viewports[0].y = 0;
2413 state->viewports[0].min_z = 0.0f;
2414 state->viewports[0].max_z = 1.0f;
2415 state->viewport_count = 1;
2419 state->scissor_rect_count = 1;
2423 if (!
memcmp(views, &
state->fb.render_targets[start_idx],
count *
sizeof(*views)))
2437 state->fb.render_targets[start_idx +
i] =
view;
2463 WARN(
"View resource %p has incompatible %s bind flags.\n",
2472 TRACE(
"Trying to do a NOP SetRenderTarget operation.\n");
2496 prev =
state->predicate;
2499 FIXME(
"Predicated rendering not implemented.\n");
2502 state->predicate = predicate;
2520 WARN(
"Start index %u is out of range.\n", start_idx);
2545 state->streams[start_idx +
i] = streams[
i];
2563 unsigned int prev_offset;
2565 TRACE(
"context %p, buffer %p, format %s, offset %u.\n",
2569 prev_buffer =
state->index_buffer;
2570 prev_format =
state->index_format;
2571 prev_offset =
state->index_offset;
2597 prev =
state->vertex_declaration;
2628 state->stream_output[
i] = outputs[
i];
2636 unsigned int vertex_count,
unsigned int start_instance,
unsigned int instance_count)
2640 TRACE(
"context %p, start_vertex %u, vertex_count %u, start_instance %u, instance_count %u.\n",
2645 0, start_vertex,
vertex_count, start_instance, instance_count,
false);
2650 unsigned int start_index,
unsigned int index_count,
unsigned int start_instance,
unsigned int instance_count)
2654 TRACE(
"context %p, base_vertex_index %d, start_index %u, index_count %u, start_instance %u, instance_count %u.\n",
2659 base_vertex_index, start_index, index_count, start_instance, instance_count,
true);
2670 WARN(
"Invalid constant buffer index %u.\n",
idx);
2682 WARN(
"Invalid view index %u.\n",
idx);
2696 WARN(
"Invalid sampler index %u.\n",
idx);
2710 WARN(
"Invalid UAV index %u.\n",
idx);
2714 return context->state->unordered_access_view[pipeline][
idx];
2724 device->max_frame_latency = latency;
2725 for (
i = 0;
i <
device->swapchain_count; ++
i)
2731 return device->max_frame_latency;
2737 unsigned int i,
size = 0;
2755 for (
i = 0;
i < texcoord_count; ++
i)
2766 float *output = &colour->
r;
2769 const float *f32_data;
2772 static const struct wined3d_color default_colour = {0.0f, 0.0f, 0.0f, 1.0f};
2773 static unsigned int warned;
2784 colour->
r = (*u32_data & 0xffu) / 255.0f;
2785 colour->
g = ((*u32_data >> 8) & 0xffu) / 255.0f;
2786 colour->
b = ((*u32_data >> 16) & 0xffu) / 255.0f;
2787 colour->
a = ((*u32_data >> 24) & 0xffu) / 255.0f;
2793 *colour = default_colour;
2794 for (
i = 0;
i <
format->component_count; ++
i)
2795 output[
i] = u16_data[
i] / 65535.0f;
2803 *colour = default_colour;
2804 for (
i = 0;
i <
format->component_count; ++
i)
2805 output[
i] = f32_data[
i];
2809 *colour = default_colour;
2825 *colour = *material_colour;
2831 colour->
r = colour->
g = colour->
b = colour->
a = 1.0f;
2840 colour->
r = colour->
g = colour->
b = colour->
a = 0.0f;
2847 colour->
r = colour->
g = colour->
b = colour->
a = 0.0f;
2848 ERR(
"Invalid material colour source %#x.\n",
mcs);
2857 return value < min_value ? min_value : value > max_value ? max_value :
value;
2892 tmp.
x =
v->x *
m->_11 +
v->y *
m->_21 +
v->z *
m->_31;
2893 tmp.
y =
v->x *
m->_12 +
v->y *
m->_22 +
v->z *
m->_32;
2894 tmp.
z =
v->x *
m->_13 +
v->y *
m->_23 +
v->z *
m->_33;
2900 float min_value,
float max_value)
2923 unsigned int light_count;
2928 ls->lighting = !!compute_lighting;
2942 if (!compute_lighting)
2948 ls->legacy_lighting = !!legacy_lighting;
2961 ++
ls->directional_light_count;
2965 ++
ls->point_light_count;
2969 ++
ls->spot_light_count;
2973 ++
ls->parallel_point_light_count;
2980 lights[
index++] = light_iter;
2985 light_count =
index;
2986 for (
i = 0,
index = 0;
i < light_count; ++
i)
2988 light_info = lights[
i];
3003 for (
i = 0;
i < light_count; ++
i)
3005 light_info = lights[
i];
3023 for (
i = 0;
i < light_count; ++
i)
3025 light_info = lights[
i];
3049 for (
i = 0;
i < light_count; ++
i)
3051 light_info = lights[
i];
3070 const struct wined3d_vec3 *position_transformed_normalised,
3080 if (
ls->localviewer)
3086 if (
t > 0.0f && (!
ls->legacy_lighting || material_shininess > 0.0f)
3103 float material_shininess)
3112 position_transformed_normalised = *(
const struct wined3d_vec3 *)&
ls->position_transformed;
3122 diffuse->
r = diffuse->
g = diffuse->
b = diffuse->
a = 0.0f;
3124 *ambient =
ls->ambient_light;
3127 for (
i = 0;
i <
ls->directional_light_count; ++
i, ++
index)
3134 &normal_transformed, &position_transformed_normalised,
light,
ls);
3137 for (
i = 0;
i <
ls->point_light_count; ++
i, ++
index)
3140 dir.x =
light->position.x -
ls->position_transformed.x;
3141 dir.y =
light->position.y -
ls->position_transformed.y;
3142 dir.z =
light->position.z -
ls->position_transformed.z;
3147 if (
ls->legacy_lighting)
3150 if (!(
dst.y > 0.0f))
3160 if (!
ls->legacy_lighting)
3168 &normal_transformed, &position_transformed_normalised,
light,
ls);
3172 for (
i = 0;
i <
ls->spot_light_count; ++
i, ++
index)
3178 dir.x =
light->position.x -
ls->position_transformed.x;
3179 dir.y =
light->position.y -
ls->position_transformed.y;
3180 dir.z =
light->position.z -
ls->position_transformed.z;
3186 if (
ls->legacy_lighting)
3189 if (!(
dst.y > 0.0f))
3200 if (
t >
light->cos_htheta)
3202 else if (t <= light->cos_hphi)
3208 if (
ls->legacy_lighting)
3217 &normal_transformed, &position_transformed_normalised,
light,
ls);
3220 for (
i = 0;
i <
ls->parallel_point_light_count; ++
i, ++
index)
3227 1.0f, material_shininess, &normal_transformed, &position_transformed_normalised,
light,
ls);
3233 switch (
ls->fog_mode)
3238 return (
ls->fog_end - fog_coord) / (
ls->fog_end -
ls->fog_start);
3240 return expf(-fog_coord *
ls->fog_density);
3242 return expf(-fog_coord * fog_coord *
ls->fog_density *
ls->fog_density);
3244 ERR(
"Unhandled fog mode %#x.\n",
ls->fog_mode);
3256 switch (
ls->fog_coord_mode)
3264 fog_coord =
fabsf(
ls->position_transformed.z);
3268 ERR(
"Unhandled fog coordinate mode %#x.\n",
ls->fog_coord_mode);
3275#define copy_and_next(dest, src, size) memcpy(dest, src, size); dest += (size)
3289 unsigned int texture_count;
3292 unsigned int vertex_size;
3293 BOOL do_clip, lighting;
3301 ERR(
"Source has no position mask.\n");
3320 FIXME(
"Clipping is broken and disabled for now\n");
3327 box.left = dwDestIndex * vertex_size;
3328 box.right =
box.left + dwCount * vertex_size;
3331 WARN(
"Failed to map buffer, hr %#lx.\n",
hr);
3334 dest_ptr = map_desc.
data;
3340 TRACE(
"View mat:\n");
3341 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat->
_11, view_mat->
_12, view_mat->
_13, view_mat->
_14);
3342 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat->
_21, view_mat->
_22, view_mat->
_23, view_mat->
_24);
3343 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat->
_31, view_mat->
_32, view_mat->
_33, view_mat->
_34);
3344 TRACE(
"%.8e %.8e %.8e %.8e\n", view_mat->
_41, view_mat->
_42, view_mat->
_43, view_mat->
_44);
3346 TRACE(
"Proj mat:\n");
3347 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat->
_11, proj_mat->
_12, proj_mat->
_13, proj_mat->
_14);
3348 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat->
_21, proj_mat->
_22, proj_mat->
_23, proj_mat->
_24);
3349 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat->
_31, proj_mat->
_32, proj_mat->
_33, proj_mat->
_34);
3350 TRACE(
"%.8e %.8e %.8e %.8e\n", proj_mat->
_41, proj_mat->
_42, proj_mat->
_43, proj_mat->
_44);
3352 TRACE(
"World mat:\n");
3353 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat->
_11, world_mat->
_12, world_mat->
_13, world_mat->
_14);
3354 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat->
_21, world_mat->
_22, world_mat->
_23, world_mat->
_24);
3355 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat->
_31, world_mat->
_32, world_mat->
_33, world_mat->
_34);
3356 TRACE(
"%.8e %.8e %.8e %.8e\n", world_mat->
_41, world_mat->
_42, world_mat->
_43, world_mat->
_44);
3360 TRACE(
"viewport x %.8e, y %.8e, width %.8e, height %.8e, min_z %.8e, max_z %.8e.\n",
3374 ? &
state->material.specular : &black;
3380 for (
i = 0;
i < dwCount; ++
i)
3383 const float *
p = (
const float *)&position_element->
data.addr[
i * position_element->
stride];
3386 unsigned int tex_index;
3399 TRACE(
"In: ( %06.2f %06.2f %06.2f )\n",
p[0],
p[1],
p[2]);
3405 rhw = (
p[0] *
mat._14) + (
p[1] *
mat._24) + (
p[2] *
mat._34) +
mat._44;
3407 TRACE(
"x=%f y=%f z=%f rhw=%f\n",
x,
y,
z, rhw);
3426 if (!do_clip || (-rhw -
eps <
x && -rhw -
eps <
y && -
eps <
z &&
x <= rhw +
eps
3427 &&
y <= rhw +
eps && z <= rhw + eps && rhw >
eps))
3464 TRACE(
"Vertex got clipped\n");
3477 TRACE(
"Writing (%f %f %f) %f\n",
x,
y,
z, rhw);
3480 ( (
float *) dest_ptr)[0] =
x;
3481 ( (
float *) dest_ptr)[1] =
y;
3482 ( (
float *) dest_ptr)[2] =
z;
3483 ( (
float *) dest_ptr)[3] = rhw;
3485 dest_ptr += 3 *
sizeof(
float);
3488 dest_ptr +=
sizeof(
float);
3492 dest_ptr +=
sizeof(
DWORD);
3499 FIXME(
"Didn't expect the destination to have a normal\n");
3523 struct wined3d_color material_diffuse, material_ambient, material_emissive, diffuse_colour;
3535 diffuse_colour.
r = ambient.r * material_ambient.
r
3536 + diffuse.r * material_diffuse.
r + material_emissive.
r;
3537 diffuse_colour.
g = ambient.g * material_ambient.
g
3538 + diffuse.g * material_diffuse.
g + material_emissive.
g;
3539 diffuse_colour.
b = ambient.b * material_ambient.
b
3540 + diffuse.b * material_diffuse.
b + material_emissive.
b;
3541 diffuse_colour.
a = material_diffuse.
a;
3545 diffuse_colour = material_diffuse;
3549 dest_ptr +=
sizeof(
DWORD);
3561 specular_colour.
r =
specular.r * material_specular.
r;
3562 specular_colour.
g =
specular.g * material_specular.
g;
3563 specular_colour.
b =
specular.b * material_specular.
b;
3564 specular_colour.
a =
ls.legacy_lighting ? 0.0f : material_specular.
a;
3568 specular_colour = material_specular;
3573 dest_ptr +=
sizeof(
DWORD);
3576 for (tex_index = 0; tex_index < texture_count; ++tex_index)
3579 const float *tex_coord = (
const float *)(
element->data.addr +
i *
element->stride);
3582 ERR(
"No source texture, but destination requests one\n");
3612 TRACE(
"device %p, src_start_idx %u, dst_idx %u, vertex_count %u, "
3613 "dst_buffer %p, declaration %p, flags %#x, dst_fvf %#x.\n",
3618 FIXME(
"Output vertex declaration not implemented yet.\n");
3641 box.left = src_start_idx *
e->stride;
3645 ERR(
"Failed to map resource.\n");
3656 ERR(
"Failed to unmap resource.\n");
3660 e->data.buffer_object = 0;
3673 ERR(
"Failed to unmap resource.\n");
3691 TRACE(
"device %p, swapchain_idx %u, mode %p, rotation %p.\n",
3708 WARN(
"Already in scene, returning WINED3DERR_INVALIDCALL.\n");
3721 WARN(
"Not in scene, returning WINED3DERR_INVALIDCALL.\n");
3734 TRACE(
"device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n",
3737 if (!rect_count && rects)
3739 WARN(
"Rects is %p, but rect_count is 0, ignoring clear\n", rects);
3748 WARN(
"Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n");
3757 WARN(
"Silently ignoring depth and target clear with mismatching sizes\n");
3776 return state->predicate;
3784 TRACE(
"context %p, primitive_type %s, patch_vertex_count %u.\n",
3798 TRACE(
"context %p, primitive_type %p, patch_vertex_count %p.\n",
3811 unsigned int src_size, dst_size, src_skip_levels = 0;
3812 unsigned int src_level_count, dst_level_count;
3813 const struct wined3d_dirty_regions *regions;
3814 unsigned int layer_count, level_count,
i,
j;
3819 TRACE(
"device %p, src_texture %p, dst_texture %p.\n",
device, src_texture, dst_texture);
3822 if (!src_texture || !dst_texture)
3824 WARN(
"Source and destination textures must be non-NULL, returning WINED3DERR_INVALIDCALL.\n");
3831 WARN(
"Source resource is GPU accessible or a scratch resource.\n");
3836 WARN(
"Destination resource is CPU accessible.\n");
3844 WARN(
"Source and destination have different types, returning WINED3DERR_INVALIDCALL.\n");
3851 WARN(
"Source and destination have different layer counts.\n");
3857 WARN(
"Source and destination formats do not match.\n");
3863 level_count =
min(src_level_count, dst_level_count);
3866 src_size =
max(src_size, src_texture->
resource.depth);
3868 dst_size =
max(dst_size, dst_texture->
resource.depth);
3869 while (src_size > dst_size)
3879 WARN(
"Source and destination dimensions do not match.\n");
3885 for (
i = 0;
i < layer_count && entire_texture; ++
i)
3890 entire_texture =
FALSE;
3898 for (
i = 0;
i < level_count; ++
i)
3901 for (
j = 0;
j < layer_count; ++
j)
3905 &src_texture->
resource,
j * src_level_count +
i + src_skip_levels, &
box,
3916 for (
i = 0;
i < layer_count; ++
i)
3918 boxes = regions[
i].boxes;
3927 for (
j = 0;
j < level_count; ++
j)
3929 src_level =
j + src_skip_levels;
3938 box.left >>= src_level;
3939 box.top >>= src_level;
3940 box.right =
min((
box.right + (1u << src_level) - 1) >> src_level,
3942 box.bottom =
min((
box.bottom + (1u << src_level) - 1) >> src_level,
3944 box.front >>= src_level;
3945 box.back =
min((
box.back + (1u << src_level) - 1) >> src_level,
3951 &src_texture->
resource,
i * src_level_count + src_level, &
box,
3969 TRACE(
"device %p, num_passes %p.\n",
device, num_passes);
3975 WARN(
"Sampler state %u has minfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n",
i);
3980 WARN(
"Sampler state %u has magfilter D3DTEXF_NONE, returning D3DERR_UNSUPPORTEDTEXTUREFILTER\n",
i);
3990 WARN(
"Non-filterable texture and mag filter enabled on sampler %u, returning E_FAIL\n",
i);
3995 WARN(
"Non-filterable texture and min filter enabled on sampler %u, returning E_FAIL\n",
i);
4001 WARN(
"Non-filterable texture and mip filter enabled on sampler %u, returning E_FAIL\n",
i);
4013 WARN(
"Depth stencil is smaller than the color buffer, returning D3DERR_CONFLICTINGRENDERSTATE\n");
4021 TRACE(
"returning D3D_OK\n");
4029 TRACE(
"device %p, software %#x.\n",
device, software);
4033 FIXME(
"device %p, software %#x stub!\n",
device, software);
4037 device->softwareVertexProcessing = software;
4052 return device->softwareVertexProcessing;
4060 TRACE(
"device %p, swapchain_idx %u, raster_status %p.\n",
4061 device, swapchain_idx, raster_status);
4073 TRACE(
"device %p, segments %.8e.\n",
device, segments);
4075 if (segments != 0.0f)
4079 FIXME(
"device %p, segments %.8e stub!\n",
device, segments);
4105 TRACE(
"context %p, dst_buffer %p, offset %u, uav %p.\n",
4116 if (src_resource->
format->id == dst_resource->
format->id)
4118 if (src_resource->
format->typeless_id && src_resource->
format->typeless_id == dst_resource->
format->typeless_id)
4124 return src_resource->
format->block_byte_count == dst_resource->
format->byte_count;
4127 return src_resource->
format->byte_count == dst_resource->
format->block_byte_count;
4134 unsigned int src_row_block_count, dst_row_block_count;
4136 unsigned int src_row_count, dst_row_count;
4140 TRACE(
"context %p, dst_resource %p, src_resource %p.\n",
context, dst_resource, src_resource);
4142 if (src_resource == dst_resource)
4144 WARN(
"Source and destination are the same resource.\n");
4148 if (src_resource->
type != dst_resource->
type)
4150 WARN(
"Resource types (%s / %s) don't match.\n",
4158 WARN(
"Resource formats %s and %s are incompatible.\n",
4164 src_row_block_count = (src_resource->
width + (src_resource->
format->block_width - 1))
4165 / src_resource->
format->block_width;
4166 dst_row_block_count = (dst_resource->
width + (dst_resource->
format->block_width - 1))
4167 / dst_resource->
format->block_width;
4168 src_row_count = (src_resource->
height + (src_resource->
format->block_height - 1))
4169 / src_resource->
format->block_height;
4170 dst_row_count = (dst_resource->
height + (dst_resource->
format->block_height - 1))
4171 / dst_resource->
format->block_height;
4173 if (src_row_block_count != dst_row_block_count || src_row_count != dst_row_count
4174 || src_resource->
depth != dst_resource->
depth)
4176 WARN(
"Resource block dimensions (%ux%ux%u / %ux%ux%u) don't match.\n",
4177 dst_row_block_count, dst_row_count, dst_resource->
depth,
4178 src_row_block_count, src_row_count, src_resource->
depth);
4198 WARN(
"Subresource layouts (%ux%u / %ux%u) don't match.\n",
4221 struct wined3d_resource *dst_resource,
unsigned int dst_sub_resource_idx,
unsigned int dst_x,
4222 unsigned int dst_y,
unsigned int dst_z,
struct wined3d_resource *src_resource,
4223 unsigned int src_sub_resource_idx,
const struct wined3d_box *src_box,
unsigned int flags)
4227 TRACE(
"context %p, dst_resource %p, dst_sub_resource_idx %u, dst_x %u, dst_y %u, dst_z %u, "
4228 "src_resource %p, src_sub_resource_idx %u, src_box %s, flags %#x.\n",
4229 context, dst_resource, dst_sub_resource_idx, dst_x, dst_y, dst_z,
4235 if (src_resource == dst_resource && src_sub_resource_idx == dst_sub_resource_idx)
4237 WARN(
"Source and destination are the same sub-resource.\n");
4243 WARN(
"Resource formats %s and %s are incompatible.\n",
4253 WARN(
"Resource types (%s / %s) don't match.\n",
4259 if (dst_sub_resource_idx)
4261 WARN(
"Invalid dst_sub_resource_idx %u.\n", dst_sub_resource_idx);
4265 if (src_sub_resource_idx)
4267 WARN(
"Invalid src_sub_resource_idx %u.\n", src_sub_resource_idx);
4275 dst_w = dst_resource->
size - dst_x;
4279 else if ((src_box->
left >= src_box->
right
4287 if (src_box->
right > src_resource->
size || dst_x >= dst_resource->
size
4288 || src_box->
right - src_box->
left > dst_resource->
size - dst_x)
4290 WARN(
"Invalid range specified, dst_offset %u, src_offset %u, size %u.\n",
4301 unsigned int src_level = src_sub_resource_idx % src_texture->
level_count;
4302 unsigned int src_row_block_count, src_row_count;
4310 if (dst_texture->
sub_resources[dst_sub_resource_idx].map_count)
4312 WARN(
"Destination sub-resource %u is mapped.\n", dst_sub_resource_idx);
4316 if (src_texture->
sub_resources[src_sub_resource_idx].map_count)
4318 WARN(
"Source sub-resource %u is mapped.\n", src_sub_resource_idx);
4324 unsigned int src_w, src_h, src_d, dst_w, dst_h, dst_d, dst_level;
4330 dst_level = dst_sub_resource_idx % dst_texture->
level_count;
4344 if (src_resource->
format->block_width == dst_resource->
format->block_width
4345 && src_resource->
format->block_height == dst_resource->
format->block_height)
4348 dst_y + (src_box->
bottom - src_box->
top), dst_z, dst_z + (src_box->
back - src_box->
front));
4352 src_row_block_count = (src_box->
right - src_box->
left + src_resource->
format->block_width - 1)
4353 / src_resource->
format->block_width;
4354 src_row_count = (src_box->
bottom - src_box->
top + src_resource->
format->block_height - 1)
4355 / src_resource->
format->block_height;
4357 dst_x + (src_row_block_count * dst_resource->
format->block_width),
4358 dst_y + (src_row_count * dst_resource->
format->block_height),
4359 dst_z, dst_z + (src_box->
back - src_box->
front));
4378 const void *
data,
unsigned int row_pitch,
unsigned int depth_pitch,
unsigned int flags)
4383 TRACE(
"context %p, resource %p, sub_resource_idx %u, box %s, data %p, row_pitch %u, depth_pitch %u, flags %#x.\n",
4391 WARN(
"Resource %p is not GPU accessible.\n",
resource);
4413 sub_resource_idx,
box,
data, row_pitch, depth_pitch);
4423 unsigned int dst_level, src_level;
4425 RECT dst_rect, src_rect;
4427 TRACE(
"context %p, dst_resource %p, dst_sub_resource_idx %u, "
4428 "src_resource %p, src_sub_resource_idx %u, format %s.\n",
4429 context, dst_resource, dst_sub_resource_idx,
4435 FIXME(
"Multisample resolve is not fully supported for typeless formats "
4436 "(dst_format %s, src_format %s, format %s).\n",
4457 dst_level = dst_sub_resource_idx % dst_texture->
level_count;
4460 src_level = src_sub_resource_idx % src_texture->
level_count;
4475 TRACE(
"context %p, view %p, rect %s, flags %#x, color %s, depth %.8e, stencil %u.\n",
4543 WARN(
"WINED3D_MAP_READ combined with WINED3D_MAP_DISCARD, ignoring flags.\n");
4548 WARN(
"WINED3D_MAP_READ combined with WINED3D_MAP_NOOVERWRITE, ignoring flags.\n");
4556 WARN(
"DISCARD or NOOVERWRITE map not on dynamic GPU-accessible buffer, ignoring.\n");
4562 WARN(
"WINED3D_MAP_NOOVERWRITE used with WINED3D_MAP_DISCARD, ignoring WINED3D_MAP_DISCARD.\n");
4563 flags &= ~WINED3D_MAP_DISCARD;
4578 TRACE(
"context %p, resource %p, sub_resource_idx %u, map_desc %p, box %s, flags %#x.\n",
4583 WARN(
"No read/write flags specified.\n");
4589 WARN(
"Resource does not have MAP_R access.\n");
4595 WARN(
"Resource does not have MAP_W access.\n");
4611 WARN(
"Map box is invalid.\n");
4652 TRACE(
"context %p, list %p, restore_state %d.\n",
context,
list, restore_state);
4662 unsigned int max_rt_count;
4664 TRACE(
"context %p, view_idx %u.\n",
context, view_idx);
4666 max_rt_count =
context->device->adapter->d3d_info.limits.max_rt_count;
4667 if (view_idx >= max_rt_count)
4669 WARN(
"Only %u render targets are supported.\n", max_rt_count);
4673 return context->state->fb.render_targets[view_idx];
4681 return context->state->fb.depth_stencil;
4693 WARN(
"Called on buffer resource %p.\n",
view->resource);
4700 WARN(
"Texture without the WINED3D_TEXTURE_GENERATE_MIPMAPS flag, ignoring.\n");
4712 unsigned int texture_level = sub_resource_idx % cursor_image->
level_count;
4721 ERR(
"Failed to map source texture.\n");
4732 desc.multisample_quality = 0;
4734 desc.bind_flags = 0;
4745 ERR(
"Failed to create cursor texture.\n");
4755 unsigned int texture_level = sub_resource_idx %
texture->level_count;
4756 unsigned int cursor_width, cursor_height;
4759 TRACE(
"device %p, x_hotspot %u, y_hotspot %u, texture %p, sub_resource_idx %u.\n",
4766 if (
device->cursor_texture)
4774 WARN(
"Texture %p has invalid format %s.\n",
4782 if ((cursor_width & (cursor_width - 1)) || (cursor_height & (cursor_height - 1)))
4784 WARN(
"Cursor size %ux%u are not all powers of two.\n", cursor_width, cursor_height);
4794 ERR(
"Failed to create cursor texture.\n");
4798 if (cursor_width == 32 && cursor_height == 32)
4800 UINT mask_size = cursor_width * cursor_height / 8;
4808 if (!(mask_bits =
malloc(mask_size)))
4810 memset(mask_bits, 0xff, mask_size);
4827 if (
device->hardwareCursor)
4830 if (
device->bCursorVisible)
4836 TRACE(
"New cursor dimensions are %ux%u.\n", cursor_width, cursor_height);
4837 device->cursorWidth = cursor_width;
4838 device->cursorHeight = cursor_height;
4839 device->xHotSpot = x_hotspot;
4840 device->yHotSpot = y_hotspot;
4848 TRACE(
"device %p, x %d, y %d, flags %#x.\n",
4851 device->xScreenSpace = x_screen_space;
4852 device->yScreenSpace = y_screen_space;
4854 if (
device->hardwareCursor)
4859 if (x_screen_space ==
pt.x && y_screen_space ==
pt.y)
4865 if (x_screen_space !=
pt.x || y_screen_space !=
pt.y)
4869 device->hardwareCursor = 0;
4884 if (show && !oldVisible)
4892 if (
device->hardwareCursor)
4894 device->bCursorVisible = show;
4900 else if (
device->cursor_texture)
4902 device->bCursorVisible = show;
4957 unsigned int flags =
texture->swapchain->state.desc.flags;
4967 texture->flags &= ~WINED3D_TEXTURE_GET_DC;
4984 BOOL backbuffer_resized, windowed;
4989 TRACE(
"device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n",
4996 ERR(
"Failed to get the first implicit swapchain.\n");
4999 swapchain_state = &swapchain->
state;
5000 current_desc = &swapchain_state->
desc;
5004 if (
device->logo_texture)
5009 if (
device->cursor_texture)
5016 if (
device->push_constants[
i])
5036 TRACE(
"New params:\n");
5070 if (device_window && device_window != current_desc->
device_window)
5072 TRACE(
"Changing the device window from %p to %p.\n",
5084 ||
mode || (!swapchain_desc->
windowed && backbuffer_resized))
5087 if (windowed && !swapchain_desc->
windowed)
5089 HWND focus_window =
device->create_parms.focus_window;
5092 focus_window = swapchain->
state.device_window;
5095 ERR(
"Failed to acquire focus window, hr %#lx.\n",
hr);
5101 swapchain_desc,
mode)))
5105 if (!windowed && swapchain_desc->
windowed)
5108 else if (!swapchain_desc->
windowed)
5120 ERR(
"Failed to get output description, hr %#lx.\n",
hr);
5124 swapchain_state->
style = 0;
5130 swapchain_state->
exstyle = exstyle;
5138 if (swapchain_desc->
flags != current_desc->
flags)
5149 if ((
view =
device->auto_depth_stencil_view))
5159 TRACE(
"Creating the depth stencil buffer.\n");
5165 texture_desc.
usage = 0;
5170 texture_desc.
depth = 1;
5171 texture_desc.
size = 0;
5176 ERR(
"Failed to create the auto depth/stencil surface, hr %#lx.\n",
hr);
5181 view_desc.
flags = 0;
5183 view_desc.
u.
texture.level_count = 1;
5185 view_desc.
u.
texture.layer_count = 1;
5191 ERR(
"Failed to create rendertarget view, hr %#lx.\n",
hr);
5206 view_desc.
flags = 0;
5208 view_desc.
u.
texture.level_count = 1;
5210 view_desc.
u.
texture.layer_count = 1;
5214 ERR(
"Failed to create rendertarget view, hr %#lx.\n",
hr);
5226 TRACE(
"Resetting state.\n");
5241 device->adapter->adapter_ops->adapter_uninit_3d(
device);
5255 if ((
view =
device->auto_depth_stencil_view))
5266 TRACE(
"device %p, enable_dialogs %#x.\n",
device, enable_dialogs);
5268 if (!enable_dialogs)
FIXME(
"Dialogs cannot be disabled yet.\n");
5294 TRACE(
"device %p, swapchain_idx %u, flags %#x, ramp %p.\n",
5306 TRACE(
"device %p, swapchain_idx %u, ramp %p.\n",
5315 TRACE(
"device_gl %p.\n", device_gl);
5319 TRACE(
"Creating the backup window for device %p.\n", device_gl);
5324 ERR(
"Failed to create a window.\n");
5330 ERR(
"Failed to get a DC.\n");
5370 ERR(
"Resource %p is still in use as render target %u.\n",
resource,
i);
5374 ERR(
"Resource %p is still in use as depth/stencil buffer.\n",
resource);
5383 ERR(
"Buffer resource %p is still in use, stream %u.\n",
resource,
i);
5390 ERR(
"Buffer resource %p is still in use as index buffer.\n",
resource);
5402 TRACE(
"Resource released.\n");
5420 for (
i = 0;
i <
k->element_count; ++
i)
5427 if ((
ret = (!
a->semantic_name - !
b->semantic_name)))
5429 if (
a->semantic_name && (
ret =
strcmp(
a->semantic_name,
b->semantic_name)))
5441 for (
i = 0;
i <
k->buffer_stride_count; ++
i)
5494 device->device_parent = device_parent;
5497 device->surface_alignment = surface_alignment;
5500 device->create_parms.adapter_idx = adapter_idx;
5502 device->create_parms.focus_window = focus_window;
5507 vertex_pipeline =
adapter->vertex_pipe;
5509 fragment_pipeline =
adapter->fragment_pipe;
5521 &
adapter->d3d_info, supported_extensions, vertex_pipeline,
5522 fragment_pipeline,
adapter->misc_state_template)))
5524 ERR(
"Failed to compile state table, hr %#lx.\n",
hr);
5536 device->max_frame_latency = 3;
5540 WARN(
"Failed to create command stream.\n");
5567 unsigned int representative,
i,
idx,
shift;
5574 for (
i = 0;
i <
device->context_count; ++
i)
5579 representative =
device->state_table[state_id].representative;
5582 for (
i = 0;
i <
device->context_count; ++
i)
5597 ERR(
"Window %p is not the focus window for device %p.\n",
window,
device);
5599 else if (
message == WM_DISPLAYCHANGE)
5601 device->device_parent->ops->mode_changed(
device->device_parent);
5605 unsigned int i =
device->swapchain_count;
static struct myctx * mcs
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void ls(int argc, const char *argv[])
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_context_gl_bind_bo(struct wined3d_context_gl *context_gl, GLenum binding, GLuint name)
void wined3d_context_gl_bind_dummy_textures(const struct wined3d_context_gl *context_gl)
void wined3d_context_gl_submit_command_fence(struct wined3d_context_gl *context_gl)
void wined3d_context_gl_wait_command_fence(struct wined3d_context_gl *context_gl, uint64_t id)
GLuint wined3d_context_gl_allocate_vram_chunk_buffer(struct wined3d_context_gl *context_gl, unsigned int pool, size_t size)
void wined3d_context_gl_destroy(struct wined3d_context_gl *context_gl)
void wined3d_context_gl_active_texture(struct wined3d_context_gl *context_gl, const struct wined3d_gl_info *gl_info, unsigned int unit)
BOOL wined3d_context_vk_create_bo(struct wined3d_context_vk *context_vk, VkDeviceSize size, VkBufferUsageFlags usage, VkMemoryPropertyFlags memory_type, struct wined3d_bo_vk *bo)
void wined3d_context_vk_destroy_vk_buffer_view(struct wined3d_context_vk *context_vk, VkBufferView vk_view, uint64_t command_buffer_id)
void wined3d_context_vk_destroy_vk_image_view(struct wined3d_context_vk *context_vk, VkImageView vk_view, uint64_t command_buffer_id)
void wined3d_context_vk_destroy_image(struct wined3d_context_vk *context_vk, struct wined3d_image_vk *image)
VkCommandBuffer wined3d_context_vk_get_command_buffer(struct wined3d_context_vk *context_vk)
void wined3d_context_vk_destroy_bo(struct wined3d_context_vk *context_vk, const struct wined3d_bo_vk *bo)
BOOL wined3d_context_vk_create_image(struct wined3d_context_vk *context_vk, VkImageType vk_image_type, VkImageUsageFlags usage, VkFormat vk_format, unsigned int width, unsigned int height, unsigned int depth, unsigned int sample_count, unsigned int mip_levels, unsigned int layer_count, unsigned int flags, struct wined3d_image_vk *image)
void wined3d_context_vk_image_barrier(struct wined3d_context_vk *context_vk, VkCommandBuffer vk_command_buffer, VkPipelineStageFlags src_stage_mask, VkPipelineStageFlags dst_stage_mask, VkAccessFlags src_access_mask, VkAccessFlags dst_access_mask, VkImageLayout old_layout, VkImageLayout new_layout, VkImage image, const VkImageSubresourceRange *range)
void wined3d_device_context_emit_set_shader_resource_views(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_shader_resource_view *const *views)
void wined3d_cs_destroy(struct wined3d_cs *cs)
void wined3d_device_context_emit_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
void wined3d_device_context_emit_set_unordered_access_views(struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *views, const unsigned int *initial_counts)
void wined3d_device_context_emit_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view)
void wined3d_device_context_emit_set_rendertarget_views(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, struct wined3d_rendertarget_view *const *views)
void wined3d_device_context_emit_set_vertex_declaration(struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
void wined3d_device_context_emit_clear_uav(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value, bool fp)
void wined3d_device_context_emit_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch)
void wined3d_device_context_emit_set_stream_outputs(struct wined3d_device_context *context, const struct wined3d_stream_output outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS])
void wined3d_device_context_emit_set_feature_level(struct wined3d_device_context *context, enum wined3d_feature_level level)
void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource)
void wined3d_device_context_emit_draw(struct wined3d_device_context *context, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count, int base_vertex_idx, unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count, bool indexed)
void wined3d_device_context_emit_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
void wined3d_device_context_emit_set_depth_stencil_state(struct wined3d_device_context *context, struct wined3d_depth_stencil_state *state, unsigned int stencil_ref)
void wined3d_device_context_emit_blt_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, unsigned int dst_sub_resource_idx, const struct wined3d_box *dst_box, struct wined3d_resource *src_resource, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box, unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
void wined3d_cs_destroy_object(struct wined3d_cs *cs, void(*callback)(void *object), void *object)
void wined3d_device_context_emit_set_stream_sources(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, uint32_t flags, const struct wined3d_color *color, float depth, DWORD stencil)
void wined3d_device_context_emit_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
void wined3d_device_context_emit_set_constant_buffers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, const struct wined3d_constant_buffer_state *buffers)
void wined3d_device_context_emit_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
void wined3d_device_context_emit_clear_rendertarget_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags, const struct wined3d_color *color, float depth, unsigned int stencil)
HRESULT wined3d_device_context_emit_unmap(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx)
void wined3d_device_context_emit_set_predication(struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value)
void wined3d_device_context_emit_reset_state(struct wined3d_device_context *context, bool invalidate)
void wined3d_device_context_emit_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
void wined3d_device_context_emit_set_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view)
struct wined3d_cs * wined3d_cs_create(struct wined3d_device *device, const enum wined3d_feature_level *levels, unsigned int level_count)
HRESULT wined3d_device_context_emit_map(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
void wined3d_device_context_emit_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
void wined3d_device_context_emit_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
void wined3d_device_context_emit_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
void wined3d_device_context_emit_execute_command_list(struct wined3d_device_context *context, struct wined3d_command_list *list, bool restore_state)
void multiply_matrix(struct wined3d_matrix *dst, const struct wined3d_matrix *src1, const struct wined3d_matrix *src2)
#define GET_TEXCOORD_SIZE_FROM_FVF(d3dvtVertexType, tex_num)
static void wined3d_color_from_d3dcolor(struct wined3d_color *wined3d_colour, D3DCOLOR d3d_colour)
ULONG CDECL wined3d_buffer_incref(struct wined3d_buffer *buffer)
ULONG CDECL wined3d_buffer_decref(struct wined3d_buffer *buffer)
void context_invalidate_compute_state(struct wined3d_context *context, DWORD state_id)
void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, const struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
void CDECL wined3d_device_context_draw(struct wined3d_device_context *context, unsigned int start_vertex, unsigned int vertex_count, unsigned int start_instance, unsigned int instance_count)
static struct wined3d_texture * wined3d_device_create_cursor_texture(struct wined3d_device *device, struct wined3d_texture *cursor_image, unsigned int sub_resource_idx)
void CDECL wined3d_device_context_set_rasterizer_state(struct wined3d_device_context *context, struct wined3d_rasterizer_state *rasterizer_state)
void CDECL wined3d_device_context_set_primitive_type(struct wined3d_device_context *context, enum wined3d_primitive_type primitive_type, unsigned int patch_vertex_count)
void CDECL wined3d_device_context_set_depth_stencil_state(struct wined3d_device_context *context, struct wined3d_depth_stencil_state *depth_stencil_state, unsigned int stencil_ref)
static void device_leftover_rasterizer_state(struct wine_rb_entry *entry, void *context)
static bool depth_stencil_state_desc_writes_ds(const struct wined3d_depth_stencil_state_desc *desc)
void CDECL wined3d_device_set_software_vertex_processing(struct wined3d_device *device, BOOL software)
static void wined3d_vec3_normalise(struct wined3d_vec3 *v)
struct wined3d_depth_stencil_state *CDECL wined3d_device_context_get_depth_stencil_state(const struct wined3d_device_context *context, unsigned int *stencil_ref)
void CDECL wined3d_device_context_set_shader(struct wined3d_device_context *context, enum wined3d_shader_type type, struct wined3d_shader *shader)
void CDECL wined3d_device_context_clear_uav_uint(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_uvec4 *clear_value)
struct wined3d_shader *CDECL wined3d_device_context_get_shader(const struct wined3d_device_context *context, enum wined3d_shader_type type)
HRESULT wined3d_device_set_implicit_swapchain(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
#define copy_and_next(dest, src, size)
void CDECL wined3d_device_get_creation_parameters(const struct wined3d_device *device, struct wined3d_device_creation_parameters *parameters)
BOOL CDECL wined3d_device_get_software_vertex_processing(const struct wined3d_device *device)
ULONG CDECL wined3d_blend_state_incref(struct wined3d_blend_state *state)
ULONG CDECL wined3d_depth_stencil_state_decref(struct wined3d_depth_stencil_state *state)
static unsigned int wined3d_get_flexible_vertex_size(uint32_t fvf)
static void update_swapchain_flags(struct wined3d_texture *texture)
void CDECL wined3d_device_set_max_frame_latency(struct wined3d_device *device, unsigned int latency)
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)
static struct wined3d_allocator_block * wined3d_device_gl_allocate_memory(struct wined3d_device_gl *device_gl, struct wined3d_context_gl *context_gl, unsigned int memory_type, GLsizeiptr size, GLuint *id)
struct wined3d_sampler *CDECL wined3d_device_context_get_sampler(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx)
GLbitfield wined3d_device_gl_get_memory_type_flags(unsigned int memory_type_idx)
void CDECL wined3d_device_context_set_blend_state(struct wined3d_device_context *context, struct wined3d_blend_state *blend_state, const struct wined3d_color *blend_factor, unsigned int sample_mask)
struct wined3d_rasterizer_state *CDECL wined3d_device_context_get_rasterizer_state(struct wined3d_device_context *context)
HDC wined3d_device_gl_get_backup_dc(struct wined3d_device_gl *device_gl)
struct wined3d_buffer *CDECL wined3d_device_context_get_index_buffer(const struct wined3d_device_context *context, enum wined3d_format_id *format, unsigned int *offset)
static unsigned int wined3d_device_gl_find_memory_type(GLbitfield flags)
static struct wined3d_allocator_chunk * wined3d_allocator_gl_create_chunk(struct wined3d_allocator *allocator, struct wined3d_context *context, unsigned int memory_type, size_t chunk_size)
static void device_free_so_desc(struct wine_rb_entry *entry, void *context)
void wined3d_device_gl_delete_opengl_contexts_cs(void *object)
static void device_leftover_depth_stencil_state(struct wine_rb_entry *entry, void *context)
HRESULT CDECL wined3d_device_context_unmap(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx)
static void wined3d_color_clamp(struct wined3d_color *dst, const struct wined3d_color *src, float min_value, float max_value)
void CDECL wined3d_device_context_resolve_sub_resource(struct wined3d_device_context *context, 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)
static bool is_dual_source(enum wined3d_blend state)
static void wined3d_blend_state_destroy_object(void *object)
static void device_free_ffp_vertex_shader(struct wine_rb_entry *entry, void *context)
HRESULT CDECL wined3d_device_context_set_rendertarget_views(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, struct wined3d_rendertarget_view *const *views, BOOL set_viewport)
void CDECL wined3d_device_set_cursor_position(struct wined3d_device *device, int x_screen_space, int y_screen_space, uint32_t flags)
void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device)
void CDECL wined3d_device_context_set_vertex_declaration(struct wined3d_device_context *context, struct wined3d_vertex_declaration *declaration)
void CDECL wined3d_device_context_clear_uav_float(struct wined3d_device_context *context, struct wined3d_unordered_access_view *view, const struct wined3d_vec4 *clear_value)
static void device_free_blend_state(struct wine_rb_entry *entry, void *context)
struct wined3d_rendertarget_view *CDECL wined3d_device_context_get_depth_stencil_view(const struct wined3d_device_context *context)
HRESULT CDECL wined3d_device_set_clip_status(struct wined3d_device *device, const struct wined3d_clip_status *clip_status)
HRESULT CDECL wined3d_device_context_map(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, unsigned int flags)
void CDECL wined3d_device_context_set_shader_resource_views(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_shader_resource_view *const *const views)
struct wined3d_query *CDECL wined3d_device_context_get_predication(struct wined3d_device_context *context, BOOL *value)
static void wined3d_format_get_colour(const struct wined3d_format *format, const void *data, struct wined3d_color *colour)
HRESULT CDECL wined3d_device_context_copy_sub_resource_region(struct wined3d_device_context *context, 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, unsigned int flags)
HRESULT CDECL wined3d_rasterizer_state_create(struct wined3d_device *device, const struct wined3d_rasterizer_state_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_rasterizer_state **state)
struct wined3d_state *CDECL wined3d_device_get_state(struct wined3d_device *device)
static void mark_managed_resource_dirty(struct wined3d_resource *resource)
bool wined3d_device_vk_create_null_resources(struct wined3d_device_vk *device_vk, struct wined3d_context_vk *context_vk)
void wined3d_device_destroy_default_samplers(struct wined3d_device *device)
UINT CDECL wined3d_device_get_available_texture_mem(const struct wined3d_device *device)
static float wined3d_clamp(float value, float min_value, float max_value)
HRESULT CDECL wined3d_device_context_set_stream_sources(struct wined3d_device_context *context, unsigned int start_idx, unsigned int count, const struct wined3d_stream_state *streams)
static void update_fog_factor(float *fog_factor, struct lights_settings *ls)
HRESULT CDECL wined3d_device_context_get_stream_source(const struct wined3d_device_context *context, unsigned int stream_idx, struct wined3d_buffer **buffer, unsigned int *offset, unsigned int *stride)
static HRESULT process_vertices_strided(const struct wined3d_device *device, const struct wined3d_stateblock_state *state, DWORD dwDestIndex, DWORD dwCount, const struct wined3d_stream_info *stream_info, struct wined3d_buffer *dest, uint32_t flags, uint32_t dst_fvf)
struct wined3d_unordered_access_view *CDECL wined3d_device_context_get_unordered_access_view(const struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int idx)
void CDECL wined3d_device_context_execute_command_list(struct wined3d_device_context *context, struct wined3d_command_list *list, bool restore_state)
ULONG CDECL wined3d_device_decref(struct wined3d_device *device)
void CDECL wined3d_device_context_get_scissor_rects(const struct wined3d_device_context *context, unsigned int *rect_count, RECT *rects)
static void update_light_diffuse_specular(struct wined3d_color *diffuse, struct wined3d_color *specular, const struct wined3d_vec3 *dir, float att, float material_shininess, const struct wined3d_vec3 *normal_transformed, const struct wined3d_vec3 *position_transformed_normalised, const struct light_transformed *light, const struct lights_settings *ls)
void *CDECL wined3d_blend_state_get_parent(const struct wined3d_blend_state *state)
static void wined3d_depth_stencil_state_destroy_object(void *object)
void CDECL wined3d_device_context_generate_mipmaps(struct wined3d_device_context *context, struct wined3d_shader_resource_view *view)
HRESULT wined3d_device_init(struct wined3d_device *device, struct wined3d *wined3d, unsigned int adapter_idx, enum wined3d_device_type device_type, HWND focus_window, unsigned int flags, BYTE surface_alignment, const enum wined3d_feature_level *levels, unsigned int level_count, const BOOL *supported_extensions, struct wined3d_device_parent *device_parent)
HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, unsigned int rect_count, const RECT *rects, uint32_t flags, const struct wined3d_color *color, float depth, unsigned int stencil)
BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context)
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)
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)
void CDECL wined3d_device_context_set_constant_buffers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, const struct wined3d_constant_buffer_state *buffers)
HRESULT CDECL wined3d_device_update_texture(struct wined3d_device *device, struct wined3d_texture *src_texture, struct wined3d_texture *dst_texture)
struct wined3d_rendertarget_view *CDECL wined3d_device_context_get_rendertarget_view(const struct wined3d_device_context *context, unsigned int view_idx)
void CDECL wined3d_device_context_set_viewports(struct wined3d_device_context *context, unsigned int viewport_count, const struct wined3d_viewport *viewports)
unsigned int CDECL wined3d_device_get_max_frame_latency(const struct wined3d_device *device)
void CDECL wined3d_device_context_get_primitive_type(const struct wined3d_device_context *context, enum wined3d_primitive_type *primitive_type, unsigned int *patch_vertex_count)
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)
void device_invalidate_state(const struct wined3d_device *device, unsigned int state_id)
float CDECL wined3d_device_get_npatch_mode(const struct wined3d_device *device)
static void wined3d_vec3_transform(struct wined3d_vec3 *dst, const struct wined3d_vec3 *v, const struct wined3d_matrix *m)
void CDECL wined3d_device_context_flush(struct wined3d_device_context *context)
void wined3d_device_uninit_3d(struct wined3d_device *device)
void CDECL wined3d_device_set_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, uint32_t flags, const struct wined3d_gamma_ramp *ramp)
static void light_set_vertex_data(struct lights_settings *ls, const struct wined3d_vec4 *position)
HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
static void wined3d_device_gl_create_dummy_textures(struct wined3d_device_gl *device_gl, struct wined3d_context_gl *context_gl)
void wined3d_device_vk_destroy_null_views(struct wined3d_device_vk *device_vk, struct wined3d_context_vk *context_vk)
HRESULT CDECL wined3d_device_context_clear_rendertarget_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view, const RECT *rect, unsigned int flags, const struct wined3d_color *color, float depth, unsigned int stencil)
static void wined3d_rasterizer_state_destroy_object(void *object)
void CDECL wined3d_device_context_get_viewports(const struct wined3d_device_context *context, unsigned int *viewport_count, struct wined3d_viewport *viewports)
void CDECL wined3d_device_context_update_sub_resource(struct wined3d_device_context *context, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch, unsigned int flags)
void CDECL wined3d_device_context_copy_uav_counter(struct wined3d_device_context *context, struct wined3d_buffer *dst_buffer, unsigned int offset, struct wined3d_unordered_access_view *uav)
struct wined3d_device_context *CDECL wined3d_device_get_immediate_context(struct wined3d_device *device)
void wined3d_device_vk_destroy_null_resources(struct wined3d_device_vk *device_vk, struct wined3d_context_vk *context_vk)
BOOL CDECL wined3d_device_show_cursor(struct wined3d_device *device, BOOL show)
static int wined3d_depth_stencil_state_compare(const void *key, const struct wine_rb_entry *entry)
void *CDECL wined3d_depth_stencil_state_get_parent(const struct wined3d_depth_stencil_state *state)
ULONG CDECL wined3d_blend_state_decref(struct wined3d_blend_state *state)
static unsigned int sanitise_map_flags(const struct wined3d_resource *resource, unsigned int flags)
void CDECL wined3d_device_context_set_unordered_access_views(struct wined3d_device_context *context, enum wined3d_pipeline pipeline, unsigned int start_idx, unsigned int count, struct wined3d_unordered_access_view *const *uavs, const unsigned int *initial_counts)
static float wined3d_calculate_fog_factor(float fog_coord, const struct lights_settings *ls)
void wined3d_device_cleanup(struct wined3d_device *device)
void CDECL wined3d_device_release_focus_window(struct wined3d_device *device)
void device_context_remove(struct wined3d_device *device, struct wined3d_context *context)
void CDECL wined3d_device_context_set_samplers(struct wined3d_device_context *context, enum wined3d_shader_type type, unsigned int start_idx, unsigned int count, struct wined3d_sampler *const *samplers)
HRESULT CDECL wined3d_blend_state_create(struct wined3d_device *device, const struct wined3d_blend_state_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_blend_state **state)
ULONG CDECL wined3d_rasterizer_state_incref(struct wined3d_rasterizer_state *state)
static int wined3d_blend_state_compare(const void *key, const struct wine_rb_entry *entry)
static void wined3d_color_rgb_mul_add(struct wined3d_color *dst, const struct wined3d_color *src, float c)
static void wined3d_vec3_subtract(struct wined3d_vec3 *v0, const struct wined3d_vec3 *v1)
bool wined3d_device_vk_create_null_views(struct wined3d_device_vk *device_vk, struct wined3d_context_vk *context_vk)
HRESULT CDECL wined3d_depth_stencil_state_create(struct wined3d_device *device, const struct wined3d_depth_stencil_state_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_depth_stencil_state **state)
static void device_resource_remove(struct wined3d_device *device, struct wined3d_resource *resource)
const struct wined3d_light WINED3D_default_light
ULONG CDECL wined3d_depth_stencil_state_incref(struct wined3d_depth_stencil_state *state)
HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device, const struct wined3d_stateblock_state *state, DWORD *num_passes)
ULONG CDECL wined3d_rasterizer_state_decref(struct wined3d_rasterizer_state *state)
static int wined3d_so_desc_compare(const void *key, const struct wine_rb_entry *entry)
static void device_free_depth_stencil_state(struct wine_rb_entry *entry, void *context)
void CDECL wined3d_device_context_set_state(struct wined3d_device_context *context, struct wined3d_state *state)
static bool use_buffer_chunk_suballocation(struct wined3d_device_gl *device_gl, const struct wined3d_gl_info *gl_info, GLenum binding)
struct wined3d_swapchain *CDECL wined3d_device_get_swapchain(const struct wined3d_device *device, UINT swapchain_idx)
static void device_free_ffp_pixel_shader(struct wine_rb_entry *entry, void *context)
static void device_free_sampler(struct wine_rb_entry *entry, void *context)
struct wined3d_buffer *CDECL wined3d_device_context_get_stream_output(struct wined3d_device_context *context, unsigned int idx, unsigned int *offset)
void CDECL wined3d_device_context_draw_indexed(struct wined3d_device_context *context, int base_vertex_index, unsigned int start_index, unsigned int index_count, unsigned int start_instance, unsigned int instance_count)
bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct wined3d_context_gl *context_gl, GLsizeiptr size, GLenum binding, GLenum usage, bool coherent, GLbitfield flags, struct wined3d_bo_gl *bo)
struct wined3d *CDECL wined3d_device_get_wined3d(const struct wined3d_device *device)
static void device_leftover_sampler(struct wine_rb_entry *entry, void *context)
void CDECL wined3d_device_context_reset_state(struct wined3d_device_context *context)
static void wined3d_device_gl_destroy_dummy_textures(struct wined3d_device_gl *device_gl, struct wined3d_context_gl *context_gl)
void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource)
HRESULT CDECL wined3d_device_get_device_caps(const struct wined3d_device *device, struct wined3d_caps *caps)
void CDECL wined3d_device_context_issue_query(struct wined3d_device_context *context, struct wined3d_query *query, unsigned int flags)
struct wined3d_vertex_declaration *CDECL wined3d_device_context_get_vertex_declaration(const struct wined3d_device_context *context)
static const struct @334 gl_memory_types[]
void CDECL wined3d_device_context_set_render_targets_and_unordered_access_views(struct wined3d_device_context *context, unsigned int rtv_count, struct wined3d_rendertarget_view *const *render_target_views, struct wined3d_rendertarget_view *depth_stencil_view, UINT uav_count, struct wined3d_unordered_access_view *const *unordered_access_views, const unsigned int *initial_counts)
static void device_load_logo(struct wined3d_device *device, const char *filename)
void CDECL wined3d_device_context_copy_resource(struct wined3d_device_context *context, struct wined3d_resource *dst_resource, struct wined3d_resource *src_resource)
static bool wined3d_null_image_vk_init(struct wined3d_image_vk *image, struct wined3d_context_vk *context_vk, VkCommandBuffer vk_command_buffer, VkImageType type, unsigned int layer_count, unsigned int sample_count)
void CDECL wined3d_device_get_gamma_ramp(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_gamma_ramp *ramp)
static bool resources_format_compatible(const struct wined3d_resource *src_resource, const struct wined3d_resource *dst_resource)
static void device_init_swapchain_state(struct wined3d_device *device, struct wined3d_swapchain *swapchain)
void CDECL wined3d_device_context_set_stream_outputs(struct wined3d_device_context *context, const struct wined3d_stream_output outputs[WINED3D_MAX_STREAM_OUTPUT_BUFFERS])
static void wined3d_device_context_unbind_srv_for_rtv(struct wined3d_device_context *context, const struct wined3d_rendertarget_view *view, BOOL dsv)
LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL unicode, UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc)
struct wined3d_shader_resource_view *CDECL wined3d_device_context_get_shader_resource_view(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx)
void *CDECL wined3d_rasterizer_state_get_parent(const struct wined3d_rasterizer_state *state)
static const struct wined3d_allocator_ops wined3d_allocator_gl_ops
ULONG CDECL wined3d_device_incref(struct wined3d_device *device)
struct wined3d_blend_state *CDECL wined3d_device_context_get_blend_state(const struct wined3d_device_context *context, struct wined3d_color *blend_factor, unsigned int *sample_mask)
void CDECL wined3d_device_context_set_predication(struct wined3d_device_context *context, struct wined3d_query *predicate, BOOL value)
static void wined3d_colour_from_mcs(struct wined3d_color *colour, enum wined3d_material_color_source mcs, const struct wined3d_color *material_colour, unsigned int index, const struct wined3d_stream_info *stream_info)
static void init_transformed_lights(struct lights_settings *ls, const struct wined3d_stateblock_state *state, BOOL legacy_lighting, BOOL compute_lighting)
static void wined3d_vec3_scale(struct wined3d_vec3 *v, float s)
static int wined3d_sampler_compare(const void *key, const struct wine_rb_entry *entry)
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)
HRESULT CDECL wined3d_device_set_npatch_mode(struct wined3d_device *device, float segments)
static void wined3d_allocator_gl_destroy_chunk(struct wined3d_allocator_chunk *chunk)
static void device_free_rasterizer_state(struct wine_rb_entry *entry, void *context)
static int wined3d_rasterizer_state_compare(const void *key, const struct wine_rb_entry *entry)
UINT CDECL wined3d_device_get_swapchain_count(const struct wined3d_device *device)
HRESULT CDECL wined3d_device_begin_scene(struct wined3d_device *device)
static void compute_light(struct wined3d_color *ambient, struct wined3d_color *diffuse, struct wined3d_color *specular, struct lights_settings *ls, const struct wined3d_vec3 *normal, float material_shininess)
HRESULT CDECL wined3d_device_context_set_depth_stencil_view(struct wined3d_device_context *context, struct wined3d_rendertarget_view *view)
HRESULT CDECL wined3d_device_get_raster_status(const struct wined3d_device *device, UINT swapchain_idx, struct wined3d_raster_status *raster_status)
void CDECL wined3d_device_context_set_scissor_rects(struct wined3d_device_context *context, unsigned int rect_count, const RECT *rects)
static float wined3d_vec3_dot(const struct wined3d_vec3 *v0, const struct wined3d_vec3 *v1)
HRESULT CDECL wined3d_device_process_vertices(struct wined3d_device *device, struct wined3d_stateblock *stateblock, UINT src_start_idx, UINT dst_idx, UINT vertex_count, struct wined3d_buffer *dst_buffer, const struct wined3d_vertex_declaration *declaration, uint32_t flags, uint32_t dst_fvf)
static void device_leftover_blend_state(struct wine_rb_entry *entry, void *context)
void wined3d_device_gl_create_primary_opengl_context_cs(void *object)
static bool stencil_op_writes_ds(const struct wined3d_stencil_op_desc *desc)
void CDECL wined3d_device_context_set_index_buffer(struct wined3d_device_context *context, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset)
void wined3d_device_create_default_samplers(struct wined3d_device *device, struct wined3d_context *context)
void CDECL wined3d_device_context_get_constant_buffer(const struct wined3d_device_context *context, enum wined3d_shader_type shader_type, unsigned int idx, struct wined3d_constant_buffer_state *state)
ULONG CDECL wined3d_query_incref(struct wined3d_query *query)
ULONG CDECL wined3d_query_decref(struct wined3d_query *query)
HRESULT wined3d_resource_check_box_dimensions(struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box)
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, uint32_t flags)
ULONG CDECL wined3d_shader_incref(struct wined3d_shader *shader)
ULONG CDECL wined3d_shader_decref(struct wined3d_shader *shader)
struct wined3d_blitter * wined3d_cpu_blitter_create(void)
HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC *dc)
HRESULT CDECL wined3d_texture_set_color_key(struct wined3d_texture *texture, uint32_t flags, const struct wined3d_color_key *color_key)
void wined3d_fbo_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info)
void wined3d_texture_clear_dirty_regions(struct wined3d_texture *texture)
HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct wined3d_resource_desc *desc, UINT layer_count, UINT level_count, uint32_t flags, const struct wined3d_sub_resource_data *data, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_texture **texture)
HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, UINT layer, const struct wined3d_box *dirty_region)
bool wined3d_texture_validate_sub_resource_idx(const struct wined3d_texture *texture, unsigned int sub_resource_idx)
ULONG CDECL wined3d_texture_decref(struct wined3d_texture *texture)
HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc)
void wined3d_raw_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info)
HRESULT CDECL wined3d_device_context_blt(struct wined3d_device_context *context, 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, unsigned int flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter)
void wined3d_ffp_blitter_create(struct wined3d_blitter **next, const struct wined3d_gl_info *gl_info)
struct wined3d_allocator_block * wined3d_allocator_allocate(struct wined3d_allocator *allocator, struct wined3d_context *context, unsigned int memory_type, size_t size)
bool wined3d_allocator_init(struct wined3d_allocator *allocator, size_t pool_count, const struct wined3d_allocator_ops *allocator_ops)
void wined3d_allocator_cleanup(struct wined3d_allocator *allocator)
void wined3d_release_dc(HWND window, HDC dc)
const char * wined3d_debug_bind_flags(uint32_t bind_flags)
const char * debug_box(const struct wined3d_box *box)
const char * debug_d3dformat(enum wined3d_format_id format_id)
void compute_normal_matrix(struct wined3d_matrix *normal_matrix, BOOL legacy_lighting, const struct wined3d_matrix *modelview)
const char * debug_vec4(const struct wined3d_vec4 *v)
const char * debug_d3dprimitivetype(enum wined3d_primitive_type primitive_type)
const char * wined3d_debug_vkresult(VkResult vr)
void wined3d_format_convert_from_float(const struct wined3d_format *format, const struct wined3d_color *color, void *ret)
const char * debug_uvec4(const struct wined3d_uvec4 *v)
int wined3d_ffp_frag_program_key_compare(const void *key, const struct wine_rb_entry *entry)
bool wined3d_allocator_chunk_init(struct wined3d_allocator_chunk *chunk, struct wined3d_allocator *allocator)
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
const struct wined3d_format * wined3d_get_format(const struct wined3d_adapter *adapter, enum wined3d_format_id format_id, unsigned int bind_flags)
void wined3d_allocator_chunk_cleanup(struct wined3d_allocator_chunk *chunk)
const char * debug_color(const struct wined3d_color *color)
int wined3d_ffp_vertex_program_key_compare(const void *key, const struct wine_rb_entry *entry)
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)
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 WINE_DECLARE_DEBUG_CHANNEL(x)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
_ACRTIMP float __cdecl powf(float, float)
_ACRTIMP float __cdecl cosf(float)
_ACRTIMP float __cdecl fabsf(float)
_ACRTIMP float __cdecl expf(float)
_ACRTIMP int __cdecl strcmp(const char *, const char *)
static unsigned int box_count(struct histogram *h, struct box *b)
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
#define InterlockedExchangePointer(Target, Value)
HRESULT compile_state_table(struct wined3d_state_entry *state_table, APPLYSTATEFUNC **dev_multistate_funcs, const struct wined3d_d3d_info *d3d_info, const BOOL *supported_extensions, const struct wined3d_vertex_pipe_ops *vertex, const struct wined3d_fragment_pipe_ops *fragment, const struct wined3d_state_entry_template *misc)
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 count
GLint GLint GLsizei GLsizei height
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)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define GL_TEXTURE_CUBE_MAP_POSITIVE_X
GLdouble GLdouble GLdouble r
#define GL_UNSIGNED_INT_8_8_8_8
GLint GLint GLsizei width
#define GL_ATOMIC_COUNTER_BUFFER
#define GL_BUFFER_SERIALIZED_MODIFY_APPLE
#define GL_UNIFORM_BUFFER
GLboolean GLboolean GLboolean b
#define GL_TEXTURE_BUFFER
#define GL_TEXTURE_1D_ARRAY
#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY
#define GL_TEXTURE_2D_MULTISAMPLE
#define GL_BUFFER_FLUSHING_UNMAP_APPLE
GLboolean GLboolean GLboolean GLboolean a
#define GL_TEXTURE_CUBE_MAP_ARRAY
#define GL_ELEMENT_ARRAY_BUFFER
#define GL_TEXTURE_2D_ARRAY
GLsizeiptr const GLvoid GLenum usage
GLint GLfloat GLint stencil
#define GL_DRAW_INDIRECT_BUFFER
#define GL_PIXEL_UNPACK_BUFFER
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 light
struct wined3d_blitter * wined3d_glsl_blitter_create(struct wined3d_blitter **next, const struct wined3d_device *device)
#define InterlockedCompareExchangePointer
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
static IPrintDialogCallback callback
D3D11_SHADER_VARIABLE_DESC desc
static const BYTE ramp[17]
static char memory[1024 *256]
static IHTMLWindow2 * window
static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos)
static RPC_BINDING_HANDLE binding
static float(__cdecl *square_half_float)(float x
#define WS_OVERLAPPEDWINDOW
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)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define LR_CREATEDIBSECTION
#define SPI_SETSCREENSAVEACTIVE
BOOL WINAPI GetCursorPos(_Out_ LPPOINT)
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
BOOL WINAPI SetCursorPos(_In_ int, _In_ int)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
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 DestroyWindow(_In_ HWND)
LRESULT WINAPI CallWindowProcA(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SPI_GETSCREENSAVEACTIVE
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
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)
int int static __inline const char * wine_dbgstr_a(const char *s)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
#define WINE_RB_ENTRY_VALUE
#define RB_FOR_EACH_ENTRY(elem, tree, type, field)
VkBufferViewCreateFlags flags
VkImageAspectFlags aspectMask
VkImageSubresourceRange subresourceRange
VkComponentMapping components
VkImageViewCreateFlags flags
IDirect3DSurface9 * depth_stencil
IDirect3DSurface9 ** render_targets
uint32_t parallel_point_light_count
uint32_t directional_light_count
struct light_transformed lights[WINED3D_MAX_SOFTWARE_ACTIVE_LIGHTS]
struct wined3d_matrix modelview_matrix
struct wined3d_color ambient_light
uint32_t spot_light_count
uint32_t point_light_count
struct wined3d_vec4 position_transformed
struct wined3d_matrix normal_matrix
struct wined3d_gl_info gl_info
struct wined3d_allocator_chunk c
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops
struct wined3d_allocator_block * memory
uint64_t command_fence_id
const struct wined3d_gl_info * gl_info
struct wined3d_command_buffer_vk current_command_buffer
const struct wined3d_vk_info * vk_info
struct wined3d_d3d_limits limits
uint32_t wined3d_creation_flags
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops
uint64_t current_fence_id
struct wined3d_dummy_textures dummy_textures
struct wined3d_allocator allocator
struct wined3d_null_resources_vk null_resources_vk
struct wined3d_null_views_vk null_views_vk
struct wined3d_rendertarget_view * depth_stencil
struct wined3d_rendertarget_view * render_targets[WINED3D_MAX_RENDER_TARGETS]
struct wined3d_shader * shader
const struct wined3d_state_entry_template * states
BOOL supported[WINED3D_GL_EXT_COUNT]
struct opengl_funcs gl_ops
struct wined3d_light_constants constants
struct wined3d_light OriginalParms
struct wined3d_device * device
const struct wined3d_parent_ops * parent_ops
struct wined3d_resource * resource
enum wined3d_resource_type resource_type
enum wined3d_multisample_type multisample_type
unsigned int multisample_quality
enum wined3d_format_id format
unsigned int format_attrs
enum wined3d_resource_type type
struct wined3d_device * device
struct list resource_list_entry
const struct wined3d_format * format
struct wined3d_resource * resource
const struct wined3d_format * format
struct list shader_list_entry
enum wined3d_primitive_type primitive_type
unsigned int patch_vertex_count
unsigned int viewport_count
struct wined3d_color blend_factor
struct wined3d_viewport viewports[WINED3D_MAX_VIEWPORTS]
struct wined3d_stream_state streams[WINED3D_MAX_STREAMS]
struct wined3d_bo_address data
struct wined3d_buffer * buffer
unsigned int multisample_quality
unsigned int backbuffer_height
BOOL auto_restore_display_mode
enum wined3d_multisample_type multisample_type
enum wined3d_format_id auto_depth_stencil_format
struct wined3d_output * output
unsigned int backbuffer_width
unsigned int backbuffer_count
enum wined3d_format_id backbuffer_format
enum wined3d_swap_effect swap_effect
BOOL enable_auto_depth_stencil
unsigned int refresh_rate
unsigned int backbuffer_bind_flags
struct wined3d_swapchain_desc desc
struct wined3d_texture ** back_buffers
struct wined3d_texture * front_buffer
struct wined3d_swapchain_state state
struct wined3d_texture::wined3d_texture_sub_resource * sub_resources
struct wined3d_resource resource
struct wined3d_texture::wined3d_dirty_regions * dirty_regions
const struct wined3d_state_entry_template * vp_states
enum wined3d_format_id format_id
struct wined3d_view_desc::@4822::@4824 texture
union wined3d_view_desc::@4822 u
BOOL supported[WINED3D_VK_EXT_COUNT]
struct wined3d_adapter * adapters[1]
VkFlags VkMemoryPropertyFlags
@ VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL
@ VK_IMAGE_LAYOUT_UNDEFINED
@ VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
@ VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
void VKAPI_CALL vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator)
@ VK_IMAGE_VIEW_TYPE_2D_ARRAY
@ VK_IMAGE_VIEW_TYPE_1D_ARRAY
@ VK_IMAGE_VIEW_TYPE_CUBE_ARRAY
@ VK_IMAGE_VIEW_TYPE_CUBE
@ VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
void VKAPI_CALL vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator)
@ VK_IMAGE_ASPECT_COLOR_BIT
@ VK_IMAGE_USAGE_TRANSFER_DST_BIT
@ VK_IMAGE_USAGE_SAMPLED_BIT
@ VK_COMPONENT_SWIZZLE_ZERO
void VKAPI_CALL vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue *pColor, uint32_t rangeCount, const VkImageSubresourceRange *pRanges)
VkFlags VkBufferUsageFlags
@ VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
@ VK_BUFFER_USAGE_TRANSFER_DST_BIT
@ VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT
@ VK_BUFFER_USAGE_VERTEX_BUFFER_BIT
VkResult VKAPI_CALL vkCreateImageView(VkDevice device, const VkImageViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkImageView *pView)
@ VK_ACCESS_TRANSFER_WRITE_BIT
VkResult VKAPI_CALL vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkBufferView *pView)
@ VK_FORMAT_R32G32B32A32_SFLOAT
@ VK_FORMAT_R8G8B8A8_UNORM
void VKAPI_CALL vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data)
@ VK_PIPELINE_STAGE_ALL_COMMANDS_BIT
@ VK_PIPELINE_STAGE_TRANSFER_BIT
#define VK_API_VERSION_1_1
@ VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO_KHR
@ VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO
@ VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
#define GL_CLIENT_STORAGE_BIT
ULONG CDECL wined3d_decref(struct wined3d *wined3d)
HRESULT CDECL wined3d_output_get_desc(const struct wined3d_output *output, struct wined3d_output_desc *desc)
ULONG CDECL wined3d_incref(struct wined3d *wined3d)
HRESULT CDECL wined3d_get_device_caps(const struct wined3d_adapter *adapter, enum wined3d_device_type device_type, struct wined3d_caps *caps)
const struct wined3d_parent_ops wined3d_null_parent_ops
void state_cleanup(struct wined3d_state *state)
const struct wined3d_stateblock_state *CDECL wined3d_stateblock_get_state(const struct wined3d_stateblock *stateblock)
void state_unbind_resources(struct wined3d_state *state)
void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, struct wined3d_stateblock *stateblock)
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)
HRESULT wined3d_swapchain_state_setup_fullscreen(struct wined3d_swapchain_state *state, HWND window, int x, int y, int width, int height)
HRESULT CDECL wined3d_swapchain_get_gamma_ramp(const struct wined3d_swapchain *swapchain, struct wined3d_gamma_ramp *ramp)
HRESULT CDECL wined3d_swapchain_state_set_fullscreen(struct wined3d_swapchain_state *state, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode)
HRESULT CDECL wined3d_swapchain_get_display_mode(const struct wined3d_swapchain *swapchain, struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation)
void swapchain_set_max_frame_latency(struct wined3d_swapchain *swapchain, const struct wined3d_device *device)
HRESULT CDECL wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain, uint32_t flags, const struct wined3d_gamma_ramp *ramp)
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 WINED3D_MAX_COMBINED_SAMPLERS
#define WINED3DFVF_SPECULAR
@ WINED3D_RS_STENCILENABLE
@ WINED3D_RS_RANGEFOGENABLE
@ WINED3D_RS_ZWRITEENABLE
@ WINED3D_RS_NORMALIZENORMALS
@ WINED3D_RS_SPECULARENABLE
@ WINED3D_RS_FOGVERTEXMODE
#define WINED3D_MAP_NO_DIRTY_UPDATE
static int wined3d_bit_scan(unsigned int *x)
#define WINED3DFVF_TEXCOUNT_SHIFT
@ WINED3D_SWAP_EFFECT_COPY
@ WINED3D_SWAP_EFFECT_SEQUENTIAL
@ WINED3D_SWAP_EFFECT_DISCARD
wined3d_material_color_source
@ 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
#define WINED3DFVF_POSITION_MASK
#define WINED3D_MAX_RENDER_TARGETS
@ WINED3D_LIGHT_PARALLELPOINT
@ WINED3D_LIGHT_DIRECTIONAL
#define WINED3D_HANDLE_RESTORE
#define WINED3D_SWAPCHAIN_GDI_COMPATIBLE
#define WINED3D_CKEY_SRC_BLT
#define WINED3DFVF_TEXCOUNT_MASK
#define WINED3D_BIND_SHADER_RESOURCE
#define WINED3DFVF_XYZRHW
#define WINED3DFVF_NORMAL
@ WINED3DFMT_R16G16_UNORM
@ WINED3DFMT_R32G32_FLOAT
@ WINED3DFMT_B8G8R8A8_UNORM
@ WINED3DFMT_R32G32B32_FLOAT
@ WINED3DFMT_R8G8B8A8_UNORM
@ WINED3DFMT_R16G16B16A16_UNORM
@ WINED3DFMT_B5G6R5_UNORM
@ WINED3DFMT_R32G32B32A32_FLOAT
#define WINED3D_MAX_STREAMS
@ WINED3D_PIPELINE_GRAPHICS
#define WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER
#define WINED3D_BIND_DEPTH_STENCIL
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_RESOURCE_ACCESS_MAP_R
#define WINED3DUSAGE_MANAGED
static bool wined3d_bound_range(unsigned int start, unsigned int count, unsigned int limit)
#define WINED3D_MAP_DISCARD
#define WINED3D_MAP_WRITE
@ WINED3D_BLEND_SRC1COLOR
@ WINED3D_BLEND_INVSRC1ALPHA
#define WINED3DUSAGE_SCRATCH
@ WINED3D_FEATURE_LEVEL_10_1
#define WINED3DCLEAR_ZBUFFER
@ WINED3D_SHADER_TYPE_VERTEX
@ WINED3D_SHADER_TYPE_COUNT
#define WINED3D_MAP_NOOVERWRITE
#define WINED3D_BIND_RENDER_TARGET
#define WINED3D_NO_DRAW_INDIRECT
#define WINED3D_LEGACY_FFP_LIGHTING
#define WINED3DUSAGE_DYNAMIC
#define WINED3DERR_INVALIDCALL
#define WINED3D_TEXTURE_CREATE_GET_DC
@ WINED3D_STENCIL_OP_KEEP
#define WINED3D_RESOURCE_ACCESS_MAP_W
HRESULT(CDECL * wined3d_device_reset_cb)(struct wined3d_resource *resource)
#define WINED3DERR_CONFLICTINGRENDERSTATE
@ ARB_TEXTURE_BUFFER_OBJECT
@ APPLE_FLUSH_BUFFER_RANGE
@ ARB_TEXTURE_MULTISAMPLE
@ ARB_TEXTURE_BUFFER_RANGE
@ ARB_TEXTURE_CUBE_MAP_ARRAY
static void wined3d_device_gl_allocator_lock(struct wined3d_device_gl *device_gl)
static void wined3d_device_gl_allocator_unlock(struct wined3d_device_gl *device_gl)
static struct wined3d_device_gl * wined3d_device_gl_from_allocator(struct wined3d_allocator *allocator)
void WINAPI wined3d_mutex_unlock(void)
void WINAPI wined3d_mutex_lock(void)
BOOL CDECL wined3d_register_window(struct wined3d *wined3d, HWND window, struct wined3d_device *device, unsigned int flags)
void wined3d_unregister_window(HWND window)
static ULONG wined3d_atomic_decrement_mutex_lock(volatile LONG *refcount)
static BOOL wined3d_format_is_typeless(const struct wined3d_format *format)
#define WINED3D_FORMAT_ATTR_FLOAT
static unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture, unsigned int level)
#define MAX_SAMPLER_OBJECTS
#define WINED3D_TEXTURE_GENERATE_MIPMAPS
#define WINED3D_OPENGL_WINDOW_CLASS_NAME
static void wined3d_rtv_bind_count_dec(struct wined3d_rendertarget_view *rtv)
#define MAX_CONSTANT_BUFFERS
static bool wined3d_is_srv_rtv_bound(const struct wined3d_state *state, const struct wined3d_shader_resource_view *srv)
static void wined3d_cs_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id queue_id)
static void wined3d_vec4_transform(struct wined3d_vec4 *dst, const struct wined3d_vec4 *v, const struct wined3d_matrix *m)
static void wined3d_not_from_cs(const struct wined3d_cs *cs)
static void wined3d_srv_bind_count_inc(struct wined3d_shader_resource_view *srv)
static unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture, unsigned int level)
static HRESULT wined3d_resource_get_sub_resource_desc(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_sub_resource_desc *desc)
static BOOL wined3d_dsv_srv_conflict(const struct wined3d_rendertarget_view *dsv, const struct wined3d_format *srv_format)
#define MAX_UNORDERED_ACCESS_VIEWS
static int wined3d_uint32_compare(uint32_t x, uint32_t y)
static void context_release(struct wined3d_context *context)
static void wined3d_device_context_unlock(struct wined3d_device_context *context)
#define STATE_IS_COMPUTE(a)
#define WINED3D_FORMAT_CAP_FILTERING
#define WINED3D_ALLOCATOR_CHUNK_SIZE
static void wined3d_rtv_bind_count_inc(struct wined3d_rendertarget_view *rtv)
#define WINED3D_TEXTURE_GET_DC
static void wined3d_state_reset(struct wined3d_state *state, const struct wined3d_d3d_info *d3d_info)
#define wined3d_lock_init(lock, name)
static void wined3d_get_material_colour_source(enum wined3d_material_color_source *diffuse, enum wined3d_material_color_source *emissive, enum wined3d_material_color_source *ambient, enum wined3d_material_color_source *specular, const struct wined3d_state *state)
static void wined3d_srv_bind_count_dec(struct wined3d_shader_resource_view *srv)
#define WINED3D_FORMAT_ATTR_NORMALISED
static void wined3d_device_context_lock(struct wined3d_device_context *context)
#define WINED3D_MAX_DIRTY_REGION_COUNT
@ WINED3D_FFP_VS_FOG_DEPTH
@ WINED3D_FFP_VS_FOG_RANGE
static void wined3d_from_cs(const struct wined3d_cs *cs)
static void wined3d_texture_get_level_box(const struct wined3d_texture *texture, unsigned int level, struct wined3d_box *box)
#define WINED3DCREATE_MULTITHREADED
static void wined3d_lock_cleanup(CRITICAL_SECTION *lock)
#define MAX_SHADER_RESOURCE_VIEWS
static void wined3d_viewport_get_z_range(const struct wined3d_viewport *vp, float *min_z, float *max_z)
static float int_to_float(uint32_t i)
#define WINED3D_FORMAT_ATTR_BLOCKS
static struct wined3d_context * context_acquire(struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
@ WINED3D_CS_QUEUE_DEFAULT
#define WINED3D_FORMAT_ATTR_CAST_TO_BLOCK
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)
#define WINED3D_MAX_SOFTWARE_ACTIVE_LIGHTS
static unsigned int wined3d_texture_get_level_depth(const struct wined3d_texture *texture, unsigned int level)
static void wined3d_context_vk_reference_image(const struct wined3d_context_vk *context_vk, struct wined3d_image_vk *image)
@ WINED3D_VK_KHR_MAINTENANCE2
static void wined3d_context_vk_reference_bo(const struct wined3d_context_vk *context_vk, struct wined3d_bo_vk *bo)
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)
static unsigned int block