45#define WINED3D_MAX_FBO_ENTRIES 64
46#define WINED3D_ALL_LAYERS (~0u)
60 if (
context->fbo_read_binding == fbo)
return;
61 context->fbo_read_binding = fbo;
65 if (
context->fbo_draw_binding == fbo)
return;
66 context->fbo_draw_binding = fbo;
70 if (
context->fbo_read_binding == fbo
71 &&
context->fbo_draw_binding == fbo)
return;
72 context->fbo_read_binding = fbo;
73 context->fbo_draw_binding = fbo;
90 for (
i = 0;
i < gl_info->
limits.buffers; ++
i)
111 gl_info->
fbo_ops.glDeleteFramebuffers(1, &fbo);
142 if (!gl_info->
fbo_ops.glFramebufferTexture)
144 FIXME(
"OpenGL implementation doesn't support glFramebufferTexture().\n");
154 if (!gl_info->
fbo_ops.glFramebufferTextureLayer)
156 FIXME(
"OpenGL implementation doesn't support glFramebufferTextureLayer().\n");
210 TRACE(
"Attach depth stencil 0.\n");
265 const char *tex_type_str;
278 if (gl_info->
limits.samples > 1)
283 FIXME(
" %s: renderbuffer %d, %dx%d, %d samples, format %#x.\n",
293 if (gl_info->
gl_ops.ext.p_glGetTextureParameteriv)
299 if (texture_type[
i].
target == tex_target)
301 tex_type_str = texture_type[
i].str;
314 tex_type_str =
"cube";
322 if (!gl_info->
supported[texture_type[
i].extension])
325 gl_info->
gl_ops.gl.p_glGetIntegerv(texture_type[
i].binding, &old_texture);
326 while (gl_info->
gl_ops.gl.p_glGetError());
329 if (!gl_info->
gl_ops.gl.p_glGetError())
331 tex_target = texture_type[
i].target;
332 tex_type_str = texture_type[
i].str;
335 gl_info->
gl_ops.gl.p_glBindTexture(texture_type[
i].
target, old_texture);
340 FIXME(
"Cannot find type of texture %d.\n",
name);
345 if (gl_info->
gl_ops.ext.p_glGetTextureParameteriv)
362 gl_info->
gl_ops.gl.p_glBindTexture(tex_target, old_texture);
365 FIXME(
" %s: %s texture %d, %dx%d, %d samples, format %#x.\n",
392 TRACE(
"FBO complete.\n");
402 ERR(
"FBO 0 is incomplete, driver bug?\n");
409 for (
i = 0;
i < gl_info->
limits.buffers; ++
i)
443 key->objects[
idx].object = 0;
444 key->objects[
idx].target = 0;
449 if (render_target->
gl_view.name)
453 key->objects[
idx].level = 0;
466 key->objects[
idx].target = 0;
468 key->rb_namespace |= 1 <<
idx;
473 key->objects[
idx].level = sub_resource_idx %
texture->level_count;
474 key->objects[
idx].layer = sub_resource_idx /
texture->level_count;
491 key->objects[
idx].target = 0;
493 key->rb_namespace |= 1 <<
idx;
498 key->objects[
idx].target = 0;
500 key->rb_namespace |= 1 <<
idx;
512 key->rb_namespace = 0;
588 struct wined3d_fbo_entry_key fbo_key;
589 unsigned int i, ds_level, rt_level;
605 WARN(
"Depth stencil is smaller than the primary color buffer, disabling.\n");
606 depth_stencil = &ds_null;
608 else if (ds_texture->
resource.multisample_type != rt_texture->
resource.multisample_type
609 || ds_texture->
resource.multisample_quality != rt_texture->
resource.multisample_quality)
611 WARN(
"Color multisample type %u and quality %u, depth stencil has %u and %u, disabling ds buffer.\n",
612 rt_texture->
resource.multisample_type, rt_texture->
resource.multisample_quality,
613 ds_texture->
resource.multisample_type, ds_texture->
resource.multisample_quality);
614 depth_stencil = &ds_null;
631 const char *resource_type;
633 TRACE(
"Dumping FBO attachments:\n");
634 for (
i = 0;
i < gl_info->
limits.buffers; ++
i)
642 resource_type =
"buffer";
650 resource_type =
"texture";
653 TRACE(
" Color attachment %u: %p, %u format %s, %s %u, %ux%u, %u samples.\n",
655 fbo_key.rb_namespace & (1 << (
i + 1)) ?
"renderbuffer" : resource_type,
665 resource_type =
"buffer";
673 resource_type =
"texture";
676 TRACE(
" Depth attachment: %p, %u format %s, %s %u, %ux%u, %u samples.\n",
678 fbo_key.rb_namespace & (1 << 0) ?
"renderbuffer" : resource_type,
685 if (
memcmp(&fbo_key, &
entry->key,
sizeof(fbo_key)))
714 GLuint read_binding, draw_binding;
723 read_binding =
context->fbo_read_binding;
724 draw_binding =
context->fbo_draw_binding;
738 for (
i = 0;
i < gl_info->
limits.buffers; ++
i)
741 entry->key.rb_namespace & (1 << (
i + 1)));
796 render_targets, &
ds, color_location, ds_location);
810 context->blit_targets[0].layer_count = 1;
820 if (
context->free_occlusion_query_count)
835 WARN(
"Occlusion queries not supported, not allocating query id.\n");
852 &
context->free_occlusion_query_size,
context->free_occlusion_query_count + 1,
853 sizeof(*
context->free_occlusion_queries)))
855 ERR(
"Failed to grow free list, leaking query %u in context %p.\n",
query->id,
context);
877 TRACE(
"Allocated sync object in context %p.\n",
context);
895 WARN(
"Fences not supported, not allocating fence.\n");
913 sizeof(*
context->free_fences)))
915 ERR(
"Failed to grow free list, leaking fence %u in context %p.\n", fence->
object.
id,
context);
927 if (
context->free_timestamp_query_count)
951 &
context->free_timestamp_query_size,
context->free_timestamp_query_count + 1,
952 sizeof(*
context->free_timestamp_queries)))
954 ERR(
"Failed to grow free list, leaking query %u in context %p.\n",
query->id,
context);
966 if (
context->free_so_statistics_query_count)
975 TRACE(
"Allocated SO statistics queries %u, %u in context %p.\n",
991 &
context->free_so_statistics_query_size,
context->free_so_statistics_query_count + 1,
992 sizeof(*
context->free_so_statistics_queries)))
994 ERR(
"Failed to grow free list, leaking GL queries %u, %u in context %p.\n",
1007 if (
context->free_pipeline_statistics_query_count)
1009 query->u =
context->free_pipeline_statistics_queries[--
context->free_pipeline_statistics_query_count];
1029 &
context->free_pipeline_statistics_query_size,
context->free_pipeline_statistics_query_count + 1,
1030 sizeof(*
context->free_pipeline_statistics_queries)))
1032 ERR(
"Failed to grow free list, leaking GL queries in context %p.\n",
context);
1036 context->free_pipeline_statistics_queries[
context->free_pipeline_statistics_query_count++] =
query->u;
1046 for (
i = 0;
i <
device->context_count; ++
i)
1054 for (
j = 0;
j < gl_info->
limits.buffers + 1; ++
j)
1057 && !(
entry->key.rb_namespace & (1 <<
j)) == !rb_namespace)
1079 if (!
device->d3d_initialized)
1088 for (
i = 0;
i <
device->context_count; ++
i)
1094 context->current_rt.sub_resource_idx = 0;
1118 for (
i = 0;
i < gl_info->
limits.buffers + 1; ++
i)
1120 if (surface->
container->texture_rgb.name ==
entry->key.objects[
i].object
1121 || surface->
container->texture_srgb.name ==
entry->key.objects[
i].object)
1123 TRACE(
"Updated surface %p is bound as attachment %u to the current FBO.\n", surface,
i);
1144 ERR(
"wglSetPixelFormatWINE failed to restore pixel format %d on window %p.\n",
1145 ctx->restore_pf,
ctx->restore_pf_win);
1152 ERR(
"can't restore pixel format %d on window %p\n",
ctx->restore_pf,
ctx->restore_pf_win);
1156 ctx->restore_pf = 0;
1169 if (
private &&
context->hdc_has_format)
1183 WARN(
"Failed to set pixel format %d on device context %p, last error %#x.\n",
1203 ERR(
"wglSetPixelFormatWINE failed to set pixel format %d on device context %p.\n",
1224 ERR(
"Unable to set pixel format %d on device context %p. Already using format %d.\n",
1241 WARN(
"Failed to set pixel format %d on device context %p.\n",
1242 ctx->pixel_format,
ctx->hdc);
1248 WARN(
"Failed to make GL context %p current on device context %p, last error %#x.\n",
1251 WARN(
"Trying fallback to the backup window.\n");
1257 if (
ctx->destroyed || !swapchain)
1259 FIXME(
"Unable to get backup dc for destroyed context %p.\n",
ctx);
1275 ERR(
"Failed to set pixel format %d on device context %p.\n",
1276 ctx->pixel_format,
ctx->hdc);
1283 ERR(
"Fallback to backup window (dc %p) failed too, last error %#x.\n",
1299 ERR(
"Failed to restore GL context %p on device context %p, last error %#x.\n",
1313 TRACE(
"Updating context %p window from %p to %p.\n",
1327 ERR(
"Failed to get a device context for window %p.\n",
context->win_handle);
1348 if (restore_ctx ==
context->glCtx)
1418 if (
context->dummy_arbfp_prog)
1425 for (
i = 0;
i <
context->free_so_statistics_query_count; ++
i)
1434 for (
i = 0;
i <
context->free_pipeline_statistics_query_count; ++
i)
1449 for (
i = 0;
i <
context->free_fence_count; ++
i)
1456 for (
i = 0;
i <
context->free_fence_count; ++
i)
1463 for (
i = 0;
i <
context->free_fence_count; ++
i)
1485 ERR(
"Failed to disable GL context.\n");
1493 ERR(
"wglDeleteContext(%p) failed, last error %#x.\n",
context->glCtx,
err);
1518 TRACE(
"Already using D3D context %p.\n",
ctx);
1526 TRACE(
"Switching away from destroyed context %p.\n", old);
1536 TRACE(
"Flushing context %p before switching to %p.\n", old,
ctx);
1537 gl_info->
gl_ops.gl.p_glFlush();
1547 ERR(
"Trying to make invalid context %p current\n",
ctx);
1551 TRACE(
"Switching to D3D context %p, GL context %p, device context %p.\n",
ctx,
ctx->glCtx,
ctx->hdc);
1558 TRACE(
"Clearing current D3D context.\n");
1562 ERR(
"Failed to clear current GL context, last error %#x.\n",
err);
1580 WARN(
"Context %p is not the current context.\n",
context);
1589 TRACE(
"Restoring GL context %p on device context %p.\n",
context->restore_ctx,
context->restore_dc);
1628 if (current_gl && (!current_context || current_context->
glCtx != current_gl))
1630 TRACE(
"Another GL context (%p on device context %p) is already current.\n",
1632 context->restore_ctx = current_gl;
1671 unsigned int cfg_count =
device->adapter->cfg_count;
1672 unsigned int current_value;
1677 TRACE(
"device %p, dc %p, color_format %s, ds_format %s, aux_buffers %#x.\n",
1682 for (
i = 0;
i < cfg_count; ++
i)
1727 if (
value > current_value)
1730 current_value =
value;
1736 ERR(
"Trying to locate a compatible pixel format because an exact match failed.\n");
1753 ERR(
"Can't find a suitable pixel format.\n");
1758 TRACE(
"Found iPixelFormat=%d for ColorFormat=%s, DepthStencilFormat=%s.\n",
1770 for (
i = 0;
i < gl_info->
limits.combined_samplers; ++
i)
1820 ERR(
">>>>>>> %s (%#x) from %s @ %s / %u.\n",
1822 err = gl_info->
gl_ops.gl.p_glGetError();
1860 unsigned int ctx_attrib_idx = 0;
1861 GLint ctx_attribs[7], ctx_flags = 0;
1874 ctx_attribs[ctx_attrib_idx++] = ctx_flags;
1876 ctx_attribs[ctx_attrib_idx] = 0;
1878 if (!(
ctx = gl_info->p_wglCreateContextAttribsARB(
hdc, share_ctx, ctx_attribs)))
1882 ctx_attribs[ctx_attrib_idx - 1] &= ~WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
1883 if (!(
ctx = gl_info->p_wglCreateContextAttribsARB(
hdc, share_ctx, ctx_attribs)))
1884 WARN(
"Failed to create a WGL context with wglCreateContextAttribsARB, last error %#x.\n",
1909 if (!(
ret = heap_alloc_zero(
sizeof(*
ret))))
1912 ret->free_timestamp_query_size = 4;
1914 sizeof(*
ret->free_timestamp_queries))))
1918 ret->free_occlusion_query_size = 4;
1920 sizeof(*
ret->free_occlusion_queries))))
1924 ret->free_fence_size = 4;
1936 if (!
device->shader_backend->shader_allocate_context_data(
ret))
1938 ERR(
"Failed to allocate shader backend context data.\n");
1941 if (!
device->adapter->fragment_pipe->allocate_context_data(
ret))
1943 ERR(
"Failed to allocate fragment pipeline context data.\n");
1959 ERR(
"Unexpected texture unit base index %u.\n",
base);
1971 ERR(
"Unexpected texture unit base index %u.\n",
base);
1982 sizeof(*
ret->texture_type))))
1987 WARN(
"Failed to retrieve device context, trying swapchain backup.\n");
1993 ERR(
"Failed to retrieve a device context.\n");
1998 color_format =
target->resource.format;
1999 target_usage =
target->resource.usage;
2047 ERR(
"Failed to set pixel format %d on device context %p.\n",
ret->pixel_format,
ret->hdc);
2053 if (
gl_info->p_wglCreateContextAttribsARB)
2062 ERR(
"Failed to create a WGL context.\n");
2069 ERR(
"wglShareLists(%p, %p) failed, last error %#x.\n", share_ctx,
ctx,
GetLastError());
2079 ERR(
"Failed to add the newly created context to the context list\n");
2100 ret->current_rt.sub_resource_idx = 0;
2114 ERR(
"Cannot activate context to set up defaults.\n");
2152 TRACE(
"Setting up the screen\n");
2157 checkGLcall(
"glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);");
2160 checkGLcall(
"glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);");
2163 checkGLcall(
"glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);");
2175 checkGLcall(
"glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment);");
2177 checkGLcall(
"glPixelStorei(GL_UNPACK_ALIGNMENT, 1);");
2193 for (
i = 1;
i <
gl_info->limits.textures; ++
i)
2198 checkGLcall(
"glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, ...");
2212 static const char dummy_program[] =
2214 "MOV result.color, fragment.color.primary;\n"
2223 for (
i = 0;
i <
gl_info->limits.textures; ++
i)
2227 checkGLcall(
"glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)");
2244 checkGLcall(
"enable GL_PRIMITIVE_RESTART_FIXED_INDEX");
2248 FIXME(
"OpenGL implementation does not support GL_PRIMITIVE_RESTART_FIXED_INDEX.\n");
2255 checkGLcall(
"enable seamless cube map filtering");
2259 device->shader_backend->shader_init_context_state(
ret);
2270 if (
device->dummy_textures.tex_2d)
2273 TRACE(
"Created context %p.\n",
ret);
2280 device->shader_backend->shader_free_context_data(
ret);
2281 device->adapter->fragment_pipe->free_context_data(
ret);
2302 TRACE(
"Delaying destruction of context %p.\n",
context);
2339 if (!shader_version)
2346 if (shader_version->
major >= 4)
2352 switch (shader_version->
type)
2363 ERR(
"Unhandled shader type %#x.\n", shader_version->
type);
2376 2.0 /
width, 0.0, 0.0, 0.0,
2377 0.0, 2.0 /
height, 0.0, 0.0,
2379 -1.0, -1.0, -1.0, 1.0,
2386 gl_info->
gl_ops.gl.p_glLoadMatrixd(projection);
2417 unsigned int clip_distance_count = gl_info->
limits.user_clip_distances;
2418 unsigned int i, disable_mask, current_mask;
2420 disable_mask = ~enable_mask;
2421 enable_mask &= (1u << clip_distance_count) - 1;
2422 disable_mask &= (1u << clip_distance_count) - 1;
2423 current_mask =
context->clip_distance_mask;
2424 context->clip_distance_mask = enable_mask;
2426 enable_mask &= ~current_mask;
2432 disable_mask &= current_mask;
2433 while (disable_mask)
2465 TRACE(
"Setting up context %p for blitting\n",
context);
2479 TRACE(
"Context is already set up for blitting, nothing to do\n");
2492 for (
i = gl_info->
limits.textures - 1;
i > 0 ; --
i)
2507 checkGLcall(
"glDisable GL_TEXTURE_RECTANGLE_ARB");
2513 checkGLcall(
"glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);");
2534 checkGLcall(
"glDisable GL_TEXTURE_RECTANGLE_ARB");
2543 gl_info->
gl_ops.gl.p_glLoadIdentity();
2550 checkGLcall(
"glTexEnvf GL_TEXTURE_LOD_BIAS_EXT ...");
2556 gl_info->
gl_ops.gl.p_glLoadIdentity();
2643 return rt_mask & (1u << 31);
2648 return rt_mask & ~(1u << 31);
2688 gl_info->
gl_ops.gl.p_glDrawBuffer(draw_buffers[0]);
2693 ERR(
"Unexpected draw buffers mask with backbuffer ORM.\n");
2707 if (new_mask == *current_mask)
2713 *current_mask = new_mask;
2750 if (old_texture_type !=
target)
2752 switch (old_texture_type)
2793 ERR(
"Unexpected texture target %#x.\n", old_texture_type);
2808 if (!
data->buffer_object)
2836 if (!
data->buffer_object)
2851 BYTE *dst_ptr, *src_ptr;
2855 if (
dst->buffer_object &&
src->buffer_object)
2876 else if (!
dst->buffer_object &&
src->buffer_object)
2882 else if (
dst->buffer_object && !
src->buffer_object)
2896 if (
context->render_offscreen == offscreen)
2910 context->render_offscreen = offscreen;
2916 if (existing == required)
2937 if (
context->render_offscreen || !depth_stencil)
return;
2943 WARN(
"Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n");
2948 ERR(
"Failed to load location.\n");
2985 DWORD rt_mask, *cur_mask;
2989 if (
context->render_offscreen)
3014 if (rt_mask != *cur_mask)
3017 *cur_mask = rt_mask;
3037 for (
i = 0;
i < rt_count; ++
i)
3053 DWORD rt_mask = 0, *cur_mask;
3057 || rt_count != gl_info->
limits.buffers)
3061 WARN(
"Invalid render target config, need at least one attachment.\n");
3072 for (
i = 0;
i < rt_count; ++
i)
3082 rt_mask |= (1u <<
i);
3086 rt_count ? rts[0]->
resource->draw_binding : 0,
3087 dsv ? dsv->
resource->draw_binding : 0);
3110 for (
i = 0;
i < rt_count; ++
i)
3113 rt_mask |= (1u <<
i);
3124 if (rt_mask != *cur_mask)
3127 *cur_mask = rt_mask;
3169 else if (!
context->render_offscreen)
3177 rt_mask =
ps ?
ps->reg_maps.rt_mask : 1;
3179 rt_mask &=
context->d3d_info->valid_dual_rt_mask;
3181 rt_mask &=
context->d3d_info->valid_rt_mask;
3189 rt_mask &= ~(1u <<
i);
3200 DWORD color_location = 0;
3205 if (!
context->render_offscreen)
3215 for (
i = 0;
i <
context->gl_info->limits.buffers; ++
i)
3225 if (!color_location)
3235 if (rt_mask != *cur_mask)
3238 *cur_mask = rt_mask;
3248 TRACE(
"Mapping stage %u to unit %u.\n", stage,
unit);
3271 context->fixed_function_usage_map = 0;
3295 context->fixed_function_usage_map |= (1u <<
i);
3299 context->fixed_function_usage_map |= (1u << (
i + 1));
3302 if (i < context->lowest_disabled_stage)
3313 context->lowest_disabled_stage =
i;
3324 unsigned int i, tex;
3327 ffu_map =
context->fixed_function_usage_map;
3329 if (d3d_info->
limits.ffp_textures == d3d_info->
limits.ffp_blend_stages
3330 ||
context->lowest_disabled_stage <= d3d_info->
limits.ffp_textures)
3332 for (
i = 0; ffu_map; ffu_map >>= 1, ++
i)
3349 for (
i = 0; ffu_map; ffu_map >>= 1, ++
i)
3354 if (
context->tex_unit_map[
i] != tex)
3378 if (i < d3d_info->limits.ffp_blend_stages)
3397 if (!ps_resource_info)
3400 return current_mapping >=
MAX_TEXTURES || !(
context->fixed_function_usage_map & (1u << current_mapping));
3404 return !ps_resource_info[current_mapping].
type;
3428 if (vs_resource_info[
i].
type)
3447 WARN(
"Couldn't find a free texture unit for vertex sampler %u.\n",
i);
3481 DWORD rt_mask, *cur_mask;
3487 if (rt_mask != *cur_mask)
3490 *cur_mask = rt_mask;
3562 stride_used =
FALSE;
3580 if (!generic_attributes && !
element->ffp_valid)
3582 WARN(
"Skipping unsupported fixed function element of format %s and usage %s.\n",
3584 stride_used =
FALSE;
3594 TRACE(
"Load %s array %u [usage %s, usage_idx %u, "
3595 "input_slot %u, offset %u, stride %u, format %s, class %s, step_rate %u].\n",
3596 use_vshader ?
"shader":
"fixed function",
idx,
3613 if (!
element->instance_data_step_rate)
3614 FIXME(
"Instance step rate 0 not implemented.\n");
3644 context->buffer_fence_count = 0;
3665 if (
state->load_base_vertex_index < 0)
3667 WARN_(d3d_perf)(
"load_base_vertex_index is < 0 (%d), not using VBOs.\n",
3668 state->load_base_vertex_index);
3669 element->data.buffer_object = 0;
3672 FIXME(
"System memory vertex data load offset is negative!\n");
3682 if (!
element->data.buffer_object)
3701 if (
state->vertex_declaration->half_float_conv_needed)
3703 TRACE(
"Using immediate mode draw with vertex shaders for FLOAT16 conversion.\n");
3757 for (
i = 0; ffu_map; ffu_map >>= 1, ++
i)
3766 unsigned int shader_mask)
3775 if (!(shader_mask & (1u <<
i)))
3787 for (
j = 0;
j <
shader->reg_maps.sampler_map.count; ++
j)
3805 unsigned int bind_idx, shader_sampler_count,
base,
count,
i;
3811 const DWORD *tex_unit_map;
3819 shader_sampler_count =
shader->reg_maps.sampler_map.count;
3820 if (shader_sampler_count >
count)
3821 FIXME(
"Shader %p needs %u samplers, but only %u are supported.\n",
3830 bind_idx = tex_unit_map[bind_idx];
3861 if (!(
view = views[
i]))
3895 if (!(
view = views[
i]))
3897 if (
shader->reg_maps.uav_resource_info[
i].type)
3898 WARN(
"No unordered access view bound at index %u.\n",
i);
3903 if (
view->gl_view.name)
3905 texture_name =
view->gl_view.name;
3916 FIXME(
"Unsupported buffer unordered access view.\n");
3922 view->format->glInternal));
3924 if (
view->counter_bo)
3960 FIXME(
"OpenGL implementation does not support framebuffers with no attachments.\n");
4002 if (
state->index_buffer)
4004 if (
context->stream_info.all_vbo)
4010 for (
i = 0;
i <
context->numDirtyEntries; ++
i)
4025 if (
context->constant_update_mask)
4028 context->constant_update_mask = 0;
4031 if (
context->update_shader_resource_bindings)
4035 context->update_shader_resource_bindings = 0;
4036 if (gl_info->
limits.combined_samplers == gl_info->
limits.graphics_samplers)
4037 context->update_compute_shader_resource_bindings = 1;
4040 if (
context->update_unordered_access_view_bindings)
4045 context->update_unordered_access_view_bindings = 0;
4046 context->update_compute_unordered_access_view_bindings = 1;
4065 unsigned int state_id,
i;
4073 unsigned int dirty_mask =
context->dirty_compute_states[
i];
4089 if (
context->update_compute_shader_resource_bindings)
4092 context->update_compute_shader_resource_bindings = 0;
4093 if (gl_info->
limits.combined_samplers == gl_info->
limits.graphics_samplers)
4094 context->update_shader_resource_bindings = 1;
4097 if (
context->update_compute_unordered_access_view_bindings)
4102 context->update_compute_unordered_access_view_bindings = 0;
4103 context->update_unordered_access_view_bindings = 1;
4124 return shader->u.gs.so_desc.element_count;
4130 if (
context->transform_feedback_active)
4134 context->transform_feedback_active = 0;
4135 context->transform_feedback_paused = 0;
4143 if (!
context->transform_feedback_active ||
context->transform_feedback_paused)
4150 context->transform_feedback_paused = 1;
4154 WARN(
"Cannot pause transform feedback operations.\n");
4163 BOOL old_render_offscreen =
context->render_offscreen, render_offscreen;
4167 &&
context->current_rt.sub_resource_idx == sub_resource_idx
4168 && render_offscreen == old_render_offscreen)
4173 if (!
context->current_rt.texture)
4182 if (old->
id !=
new->id)
4203 && old_render_offscreen && (
context->current_rt.texture !=
texture
4204 ||
context->current_rt.sub_resource_idx != sub_resource_idx))
4206 unsigned int prev_sub_resource_idx =
context->current_rt.sub_resource_idx;
4218 context->current_rt.sub_resource_idx = sub_resource_idx;
4234 ERR(
"Failed to activate the new context.\n");
4247 BOOL swapchain_texture;
4253 if (current_context && current_context->
destroyed)
4254 current_context =
NULL;
4274 sub_resource_idx = 0;
4282 else if (swapchain_texture)
4284 TRACE(
"Rendering onscreen.\n");
4290 TRACE(
"Rendering offscreen.\n");
4294 if (current_context && current_context->
device ==
device)
4315 if (
context->current_rt.texture)
4322 if (acquired_context !=
context)
4323 ERR(
"Acquired context %p instead of %p.\n", acquired_context,
context);
4324 return acquired_context;
4337 WARN(
"Invalid context, skipping dispatch.\n");
4345 FIXME(
"OpenGL implementation does not support compute shaders.\n");
4357 WARN(
"No compute shader bound, skipping dispatch.\n");
4381 gl_info->
gl_ops.gl.p_glFlush();
4388 const void *idx_data,
unsigned int idx_size,
int base_vertex_idx,
unsigned int start_idx,
4389 unsigned int count,
unsigned int start_instance,
unsigned int instance_count)
4396 unsigned int instanced_element_count = 0;
4401 indices = (
const char *)idx_data + idx_size * start_idx;
4403 if (!instance_count)
4425 FIXME(
"Start instance (%u) not supported.\n", start_instance);
4433 GL_EXTCALL(glDrawArraysInstancedBaseInstance(
mode, start_idx,
count, instance_count, start_instance));
4446 indices, instance_count, base_vertex_idx, start_instance));
4447 checkGLcall(
"glDrawElementsInstancedBaseVertexBaseInstance");
4453 indices, instance_count, base_vertex_idx));
4474 FIXME(
"Non-indexed instanced drawing is not supported.\n");
4484 instanced_elements[instanced_element_count++] =
i;
4487 for (
i = 0;
i < instance_count; ++
i)
4490 for (
j = 0;
j < instanced_element_count; ++
j)
4493 unsigned int element_idx;
4496 element_idx = instanced_elements[
j];
4499 if (
element->data.buffer_object)
4519 unsigned int element_idx,
unsigned int stride_idx,
float *
result)
4521#define SI_FORMAT(idx) (si->elements[(idx)].format->emit_idx)
4522#define SI_PTR(idx1, idx2) (si->elements[(idx1)].data.addr + si->elements[(idx1)].stride * (idx2))
4524 const float *
data = (
const float *)
SI_PTR(element_idx, stride_idx);
4525 float vector[4] = {0.0f, 0.0f, 0.0f, 1.0f};
4526 float cur_weight, weight_sum = 0.0f;
4528 const BYTE *blend_index;
4541 FIXME(
"no blend indices / weights set\n");
4612 unsigned int base_vertex_idx,
unsigned int start_idx,
unsigned int vertex_idx)
4615 return start_idx + vertex_idx;
4617 return ((
const WORD *)idx_data)[start_idx + vertex_idx] + base_vertex_idx;
4618 return ((
const DWORD *)idx_data)[start_idx + vertex_idx] + base_vertex_idx;
4624 int base_vertex_idx,
unsigned int start_idx,
unsigned int vertex_count,
unsigned int instance_count)
4628 unsigned int coord_idx, stride_idx, texture_idx, vertex_idx;
4632 unsigned int texture_unit, texture_stages;
4634 unsigned int untracked_material_count;
4635 unsigned int tex_mask = 0;
4641 static unsigned int once;
4644 FIXME_(d3d_perf)(
"Drawing using immediate mode.\n");
4646 WARN_(d3d_perf)(
"Drawing using immediate mode.\n");
4648 if (!idx_size && idx_data)
4649 ERR(
"Non-NULL idx_data with 0 idx_size, this should never happen.\n");
4652 FIXME(
"Instancing not implemented.\n");
4661 gl_info->
gl_ops.gl.p_glBegin(
state->gl_primitive_type);
4665 for (vertex_idx = 0; vertex_idx <
vertex_count; ++vertex_idx)
4667 unsigned int use_map = si->
use_map;
4668 unsigned int element_idx;
4670 stride_idx =
get_stride_idx(idx_data, idx_size, base_vertex_idx, start_idx, vertex_idx);
4671 for (element_idx =
MAX_ATTRIBS - 1; use_map; use_map &= ~(1u << element_idx), --element_idx)
4673 if (!(use_map & 1u << element_idx))
4681 gl_info->
gl_ops.gl.p_glEnd();
4691 gl_info->
gl_ops.gl.p_glNormal3f(0.0f, 0.0f, 0.0f);
4693 untracked_material_count =
context->num_untracked_materials;
4704 gl_info->
gl_ops.gl.p_glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
4721 specular_fog =
TRUE;
4727 static unsigned int once;
4730 FIXME(
"Implement fog for transformed vertices in software.\n");
4736 GL_EXTCALL(glSecondaryColor3fEXT)(0.0f, 0.0f, 0.0f);
4739 texture_stages = d3d_info->
limits.ffp_blend_stages;
4740 for (texture_idx = 0; texture_idx < texture_stages; ++texture_idx)
4744 FIXME(
"Program using multiple concurrent textures which this OpenGL implementation doesn't support.\n");
4748 if (!ps && !
state->textures[texture_idx])
4751 texture_unit =
context->tex_unit_map[texture_idx];
4758 TRACE(
"Skipping generated coordinates (%#x) for texture %u.\n", coord_idx, texture_idx);
4765 tex_mask |= (1u << texture_idx);
4769 TRACE(
"Setting default coordinates for texture %u.\n", texture_idx);
4773 gl_info->
gl_ops.gl.p_glTexCoord4f(0.0f, 0.0f, 0.0f, 1.0f);
4780 for (vertex_idx = 0; vertex_idx <
vertex_count; ++vertex_idx)
4782 unsigned int tmp_tex_mask;
4784 stride_idx =
get_stride_idx(idx_data, idx_size, base_vertex_idx, start_idx, vertex_idx);
4797 if (untracked_material_count)
4803 for (
i = 0;
i < untracked_material_count; ++
i)
4819 tmp_tex_mask = tex_mask;
4820 for (texture_idx = 0; tmp_tex_mask; tmp_tex_mask >>= 1, ++texture_idx)
4822 if (!(tmp_tex_mask & 1))
4838 gl_info->
gl_ops.gl.p_glEnd();
4851 FIXME(
"OpenGL implementation does not support indirect draws.\n");
4861 if (
state->index_offset)
4862 FIXME(
"Ignoring index offset %u.\n",
state->index_offset);
4884 if (!(
s->use_map & (1u <<
i)))
4887 e = &
s->elements[
i];
4888 if (
e->data.buffer_object)
4891 e->data.buffer_object = 0;
4900 switch (gl_primitive_type)
4919 return gl_primitive_type;
4935 unsigned int i, idx_size = 0;
4936 const void *idx_data =
NULL;
4950 WARN(
"Invalid context, skipping draw.\n");
4958 for (
i = 0;
i <
gl_info->limits.buffers; ++
i)
4995 WARN(
"Unable to apply draw state, skipping draw.\n");
5014 idx_data = index_buffer->
resource.heap_memory;
5018 ib_fence = index_buffer->
fence;
5021 idx_data = (
const BYTE *)idx_data +
state->index_offset;
5037 FIXME(
"Using software emulation because not all material properties could be tracked.\n");
5039 WARN_(d3d_perf)(
"Using software emulation because not all material properties could be tracked.\n");
5050 FIXME(
"Using software emulation because manual fog coordinates are provided.\n");
5052 WARN_(d3d_perf)(
"Using software emulation because manual fog coordinates are provided.\n");
5057 WARN_(d3d_perf)(
"Using software emulation because application requested SVP.\n");
5064 si_emulated =
context->stream_info;
5078 rasterizer_discard =
TRUE;
5081 if (
context->transform_feedback_paused)
5085 context->transform_feedback_paused = 0;
5087 else if (!
context->transform_feedback_active)
5092 context->transform_feedback_active = 1;
5104 if (!
context->use_immediate_mode_draw && !emulation)
5107 FIXME(
"Indirect draws with immediate mode/emulation are not supported.\n");
5111 unsigned int instance_count = parameters->
u.
direct.instance_count;
5113 instance_count =
context->instance_count;
5115 if (
context->use_immediate_mode_draw || emulation)
5117 idx_size, parameters->
u.
direct.base_vertex_idx,
5118 parameters->
u.
direct.start_idx, parameters->
u.
direct.index_count, instance_count);
5121 parameters->
u.
direct.start_idx, parameters->
u.
direct.index_count,
5122 parameters->
u.
direct.start_instance, instance_count);
5133 if (rasterizer_discard)
5141 for (
i = 0;
i <
context->buffer_fence_count; ++
i)
5145 gl_info->
gl_ops.gl.p_glFlush();
void destroy(_Tp *__pointer)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
ACPI_SIZE strlen(const char *String)
static void * heap_alloc(size_t len)
static BOOL heap_free(void *mem)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
static const struct @264 state_table[]
DWORD wined3d_buffer_get_memory(struct wined3d_buffer *buffer, struct wined3d_bo_address *data, DWORD locations)
BYTE * wined3d_buffer_load_sysmem(struct wined3d_buffer *buffer, struct wined3d_context *context)
void wined3d_buffer_load(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state)
BOOL wined3d_buffer_load_location(struct wined3d_buffer *buffer, struct wined3d_context *context, DWORD location)
void wined3d_buffer_invalidate_location(struct wined3d_buffer *buffer, DWORD location)
static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt_mask)
static BOOL context_unit_free_for_vs(const struct wined3d_context *context, const struct wined3d_shader_resource_info *ps_resource_info, DWORD unit)
static void context_apply_fbo_state(struct wined3d_context *context, GLenum target, struct wined3d_rendertarget_info *render_targets, struct wined3d_surface *depth_stencil, DWORD color_location, DWORD ds_location)
static void context_map_psamplers(struct wined3d_context *context, const struct wined3d_state *state)
void context_enable_clip_distances(struct wined3d_context *context, unsigned int enable_mask)
void context_bind_bo(struct wined3d_context *context, GLenum binding, GLuint name)
void context_unmap_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, GLenum binding)
void context_set_tls_idx(DWORD idx)
static void context_preload_textures(struct wined3d_context *context, const struct wined3d_state *state)
static struct fbo_entry * context_create_fbo_entry(const struct wined3d_context *context, const struct wined3d_rendertarget_info *render_targets, const struct wined3d_rendertarget_info *depth_stencil, DWORD color_location, DWORD ds_location)
GLenum context_get_offscreen_gl_buffer(const struct wined3d_context *context)
const DWORD * context_get_tex_unit_mapping(const struct wined3d_context *context, const struct wined3d_shader_version *shader_version, unsigned int *base, unsigned int *count)
static void context_update_fixed_function_usage_map(struct wined3d_context *context, const struct wined3d_state *state)
static void context_get_rt_size(const struct wined3d_context *context, SIZE *size)
static int context_choose_pixel_format(const struct wined3d_device *device, HDC hdc, const struct wined3d_format *color_format, const struct wined3d_format *ds_format, BOOL auxBuffers)
void context_check_fbo_status(const struct wined3d_context *context, GLenum target)
static void context_enter(struct wined3d_context *context)
void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
static void context_attach_depth_stencil_fbo(struct wined3d_context *context, GLenum fbo_target, const struct wined3d_fbo_resource *resource, BOOL rb_namespace, DWORD flags)
struct wined3d_context * context_acquire(const struct wined3d_device *device, struct wined3d_texture *texture, unsigned int sub_resource_idx)
static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum)
static void context_bind_shader_resources(struct wined3d_context *context, const struct wined3d_state *state, enum wined3d_shader_type shader_type)
void context_alloc_so_statistics_query(struct wined3d_context *context, struct wined3d_so_statistics_query *query)
void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info, unsigned int unit)
static BOOL use_transform_feedback(const struct wined3d_state *state)
static void context_preload_texture(struct wined3d_context *context, const struct wined3d_state *state, unsigned int idx)
static BOOL context_set_pixel_format(struct wined3d_context *context)
static void remove_vbos(struct wined3d_context *context, const struct wined3d_state *state, struct wined3d_stream_info *s)
BOOL context_set_current(struct wined3d_context *ctx)
void context_invalidate_compute_state(struct wined3d_context *context, DWORD state_id)
static void context_update_tex_unit_map(struct wined3d_context *context, const struct wined3d_state *state)
static void context_load_shader_resources(struct wined3d_context *context, const struct wined3d_state *state, unsigned int shader_mask)
static GLenum gl_tfb_primitive_type_from_d3d(enum wined3d_primitive_type primitive_type)
void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint name)
static void context_queue_fbo_entry_destruction(struct wined3d_context *context, struct fbo_entry *entry)
static void context_destroy_fbo_entry(struct wined3d_context *context, struct fbo_entry *entry)
void context_destroy(struct wined3d_device *device, struct wined3d_context *context)
BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_state *state, UINT rt_count, const struct wined3d_fb_state *fb)
void context_free_occlusion_query(struct wined3d_occlusion_query *query)
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
static void context_restore_gl_context(const struct wined3d_gl_info *gl_info, HDC dc, HGLRC gl_ctx)
static void context_dump_fbo_attachment(const struct wined3d_gl_info *gl_info, GLenum target, GLenum attachment)
static GLenum draw_buffer_from_rt_mask(DWORD rt_mask)
static void draw_primitive_immediate_mode(struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_stream_info *si, const void *idx_data, unsigned int idx_size, int base_vertex_idx, unsigned int start_idx, unsigned int vertex_count, unsigned int instance_count)
static void context_set_fbo_key_for_render_target(const struct wined3d_context *context, struct wined3d_fbo_entry_key *key, unsigned int idx, const struct wined3d_rendertarget_info *render_target, DWORD location)
static BOOL context_debug_output_enabled(const struct wined3d_gl_info *gl_info)
void context_alloc_pipeline_statistics_query(struct wined3d_context *context, struct wined3d_pipeline_statistics_query *query)
static BOOL context_apply_draw_state(struct wined3d_context *context, const struct wined3d_device *device, const struct wined3d_state *state)
static void context_load_unordered_access_resources(struct wined3d_context *context, const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
static void context_validate_onscreen_formats(struct wined3d_context *context, const struct wined3d_rendertarget_view *depth_stencil)
void context_surface_update(struct wined3d_context *context, const struct wined3d_surface *surface)
void context_free_so_statistics_query(struct wined3d_so_statistics_query *query)
static void context_activate(struct wined3d_context *context, struct wined3d_texture *texture, unsigned int sub_resource_idx)
static void context_clean_fbo_attachments(const struct wined3d_gl_info *gl_info, GLenum target)
static void context_pause_transform_feedback(struct wined3d_context *context, BOOL force)
static void draw_indirect(struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_indirect_draw_parameters *parameters, unsigned int idx_size)
static void context_set_render_offscreen(struct wined3d_context *context, BOOL offscreen)
void context_resource_released(const struct wined3d_device *device, struct wined3d_resource *resource, enum wined3d_resource_type type)
#define WINED3D_ALL_LAYERS
void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query)
static void context_update_stream_info(struct wined3d_context *context, const struct wined3d_state *state)
void context_invalidate_state(struct wined3d_context *context, DWORD state)
static DWORD context_generate_rt_mask_no_fbo(const struct wined3d_context *context, struct wined3d_texture *rt)
void context_free_fence(struct wined3d_fence *fence)
static void context_generate_fbo_key(const struct wined3d_context *context, struct wined3d_fbo_entry_key *key, const struct wined3d_rendertarget_info *render_targets, const struct wined3d_rendertarget_info *depth_stencil, DWORD color_location, DWORD ds_location)
void context_end_transform_feedback(struct wined3d_context *context)
static void WINE_GLAPI wined3d_debug_callback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, void *ctx)
static void context_apply_compute_state(struct wined3d_context *context, const struct wined3d_device *device, const struct wined3d_state *state)
void wined3d_stream_info_from_declaration(struct wined3d_stream_info *stream_info, const struct wined3d_state *state, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info)
static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state)
static DWORD wined3d_context_tls_idx
static BOOL is_rt_mask_onscreen(DWORD rt_mask)
static void context_bind_fbo(struct wined3d_context *context, GLenum target, GLuint fbo)
static void context_map_fixed_function_samplers(struct wined3d_context *context, const struct wined3d_state *state)
static struct fbo_entry * context_find_fbo_entry(struct wined3d_context *context, GLenum target, const struct wined3d_rendertarget_info *render_targets, const struct wined3d_rendertarget_info *depth_stencil, DWORD color_location, DWORD ds_location)
static void context_invalidate_texture_stage(struct wined3d_context *context, DWORD stage)
static DWORD context_generate_rt_mask(GLenum buffer)
static BOOL match_depth_stencil_format(const struct wined3d_format *existing, const struct wined3d_format *required)
void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device)
static BOOL have_framebuffer_attachment(unsigned int rt_count, struct wined3d_rendertarget_view *const *rts, const struct wined3d_rendertarget_view *ds)
#define SI_PTR(idx1, idx2)
static void context_attach_surface_fbo(struct wined3d_context *context, GLenum fbo_target, DWORD idx, const struct wined3d_fbo_resource *resource, BOOL rb_namespace)
void context_bind_dummy_textures(const struct wined3d_device *device, const struct wined3d_context *context)
static const BYTE * software_vertex_blending(struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_stream_info *si, unsigned int element_idx, unsigned int stride_idx, float *result)
static void context_reuse_fbo_entry(struct wined3d_context *context, GLenum target, const struct wined3d_rendertarget_info *render_targets, const struct wined3d_rendertarget_info *depth_stencil, DWORD color_location, DWORD ds_location, struct fbo_entry *entry)
static void context_map_vsamplers(struct wined3d_context *context, BOOL ps, const struct wined3d_state *state)
#define WINED3D_MAX_FBO_ENTRIES
static void context_update_window(struct wined3d_context *context)
static BOOL context_restore_pixel_format(struct wined3d_context *ctx)
void context_copy_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *dst, GLenum dst_binding, const struct wined3d_bo_address *src, GLenum src_binding, size_t size)
HGLRC context_create_wgl_attribs(const struct wined3d_gl_info *gl_info, HDC hdc, HGLRC share_ctx)
void dispatch_compute(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_dispatch_parameters *parameters)
void context_alloc_fence(struct wined3d_context *context, struct wined3d_fence *fence)
void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
static void draw_primitive_arrays(struct wined3d_context *context, const struct wined3d_state *state, const void *idx_data, unsigned int idx_size, int base_vertex_idx, unsigned int start_idx, unsigned int count, unsigned int start_instance, unsigned int instance_count)
struct wined3d_context * context_create(struct wined3d_swapchain *swapchain, struct wined3d_texture *target, const struct wined3d_format *ds_format)
void context_alloc_occlusion_query(struct wined3d_context *context, struct wined3d_occlusion_query *query)
struct wined3d_context * context_get_current(void)
static BOOL context_set_gl_context(struct wined3d_context *ctx)
void context_release(struct wined3d_context *context)
void context_free_timestamp_query(struct wined3d_timestamp_query *query)
void * context_map_bo_address(struct wined3d_context *context, const struct wined3d_bo_address *data, size_t size, GLenum binding, DWORD flags)
static void context_enum_fbo_entries(const struct wined3d_device *device, GLuint name, BOOL rb_namespace, context_fbo_entry_func_t *callback)
static void set_blit_dimension(const struct wined3d_gl_info *gl_info, UINT width, UINT height)
static void context_setup_target(struct wined3d_context *context, struct wined3d_texture *texture, unsigned int sub_resource_idx)
struct wined3d_context * context_reacquire(const struct wined3d_device *device, struct wined3d_context *context)
void context_restore(struct wined3d_context *context, struct wined3d_surface *restore)
static void context_destroy_gl_resources(struct wined3d_context *context)
static void context_attach_depth_stencil_rb(const struct wined3d_gl_info *gl_info, GLenum fbo_target, DWORD flags, GLuint rb)
static void SetupForBlit(const struct wined3d_device *device, struct wined3d_context *context)
static void context_apply_fbo_entry(struct wined3d_context *context, GLenum target, struct fbo_entry *entry)
DWORD context_get_tls_idx(void)
static unsigned int get_stride_idx(const void *idx_data, unsigned int idx_size, unsigned int base_vertex_idx, unsigned int start_idx, unsigned int vertex_idx)
static void context_attach_gl_texture_fbo(struct wined3d_context *context, GLenum fbo_target, GLenum attachment, const struct wined3d_fbo_resource *resource)
static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit)
void context_gl_resource_released(struct wined3d_device *device, GLuint name, BOOL rb_namespace)
static void context_destroy_fbo(struct wined3d_context *context, GLuint fbo)
static DWORD context_generate_rt_mask_from_resource(struct wined3d_resource *resource)
void wined3d_check_gl_call(const struct wined3d_gl_info *gl_info, const char *file, unsigned int line, const char *name)
void() context_fbo_entry_func_t(struct wined3d_context *context, struct fbo_entry *entry)
void context_free_pipeline_statistics_query(struct wined3d_pipeline_statistics_query *query)
static void context_load_stream_output_buffers(struct wined3d_context *context, const struct wined3d_state *state)
void draw_primitive(struct wined3d_device *device, const struct wined3d_state *state, const struct wined3d_draw_parameters *parameters)
void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location)
static void context_bind_unordered_access_views(struct wined3d_context *context, const struct wined3d_shader *shader, struct wined3d_unordered_access_view *const *views)
BOOL device_context_add(struct wined3d_device *device, struct wined3d_context *context)
void device_context_remove(struct wined3d_device *device, struct wined3d_context *context)
GLenum gl_primitive_type_from_d3d(enum wined3d_primitive_type primitive_type)
void wined3d_fence_issue(struct wined3d_fence *fence, const struct wined3d_device *device)
BOOL wined3d_resource_is_offscreen(struct wined3d_resource *resource)
GLenum wined3d_resource_gl_legacy_map_flags(DWORD d3d_flags)
GLbitfield wined3d_resource_gl_map_flags(DWORD d3d_flags)
BOOL vshader_get_input(const struct wined3d_shader *shader, BYTE usage_req, BYTE usage_idx_req, unsigned int *regnum)
void surface_set_compatible_renderbuffer(struct wined3d_surface *surface, const struct wined3d_rendertarget_info *rt)
BOOL wined3d_texture_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location)
void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location)
GLenum wined3d_texture_get_gl_buffer(const struct wined3d_texture *texture)
struct wined3d_texture *__cdecl wined3d_texture_from_resource(struct wined3d_resource *resource)
void wined3d_texture_load(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb)
void wined3d_release_dc(HWND window, HDC dc)
void get_modelview_matrix(const struct wined3d_context *context, const struct wined3d_state *state, unsigned int index, struct wined3d_matrix *mat)
const struct wined3d_format * wined3d_get_format(const struct wined3d_gl_info *gl_info, enum wined3d_format_id format_id, unsigned int resource_usage)
const char * debug_d3dformat(enum wined3d_format_id format_id)
const char * debug_d3dinput_classification(enum wined3d_input_classification classification)
void wined3d_gl_limits_get_texture_unit_range(const struct wined3d_gl_limits *gl_limits, enum wined3d_shader_type shader_type, unsigned int *base, unsigned int *count)
BOOL invert_matrix(struct wined3d_matrix *out, const struct wined3d_matrix *m)
const char * debug_d3dresourcetype(enum wined3d_resource_type resource_type)
BOOL wined3d_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
const char * debug_fboattachment(GLenum attachment)
const char * debug_d3ddeclusage(enum wined3d_decl_usage usage)
const char * debug_glerror(GLenum error)
BOOL invert_matrix_3d(struct wined3d_matrix *out, const struct wined3d_matrix *in)
const char * debug_fbostatus(GLenum status)
void wined3d_rendertarget_view_prepare_location(struct wined3d_rendertarget_view *view, struct wined3d_context *context, DWORD location)
void wined3d_shader_resource_view_bind(struct wined3d_shader_resource_view *view, unsigned int unit, struct wined3d_sampler *sampler, struct wined3d_context *context)
void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_access_view *view, DWORD location)
void wined3d_rendertarget_view_invalidate_location(struct wined3d_rendertarget_view *view, DWORD location)
void wined3d_rendertarget_view_load_location(struct wined3d_rendertarget_view *view, struct wined3d_context *context, DWORD location)
void wined3d_rendertarget_view_validate_location(struct wined3d_rendertarget_view *view, DWORD location)
const char * wine_dbg_sprintf(const char *format,...)
static __inline const char * debugstr_an(const char *s, int n)
#define WINE_DECLARE_DEBUG_CHANNEL(x)
static void restore_dc(GpGraphics *graphics, INT state)
LPVOID WINAPI TlsGetValue(IN DWORD Index)
BOOL WINAPI TlsSetValue(IN DWORD Index, IN LPVOID Value)
GLAPI void GLAPIENTRY glEnable(GLenum cap)
#define GL_TEXTURE_CUBE_MAP
#define GL_FRONT_AND_BACK
#define GL_UNSIGNED_SHORT
GLuint GLuint GLsizei count
#define GL_PACK_ALIGNMENT
GLuint GLuint GLsizei GLenum type
GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
#define GL_TEXTURE_HEIGHT
#define GL_LIGHT_MODEL_LOCAL_VIEWER
#define GL_UNPACK_ALIGNMENT
#define GL_TEXTURE_ENV_MODE
#define GL_TEXTURE_INTERNAL_FORMAT
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
#define GL_TEXTURE_BINDING_CUBE_MAP
GLAPI void GLAPIENTRY glDisable(GLenum cap)
#define GL_TRIANGLE_STRIP
GLint GLint GLsizei width
#define GL_LIGHT_MODEL_COLOR_CONTROL
#define GL_SEPARATE_SPECULAR_COLOR
GLuint GLuint GLsizei GLenum const GLvoid * indices
#define GL_TEXTURE_BINDING_2D
GLAPI void GLAPIENTRY glActiveTexture(GLenum texture)
GLdouble GLdouble GLdouble GLdouble q
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
#define GL_POINT_SPRITE_ARB
#define GL_ATOMIC_COUNTER_BUFFER
#define GL_RENDERBUFFER_SAMPLES
#define GL_COPY_WRITE_BUFFER
#define GL_RENDERBUFFER_WIDTH
#define GL_PROGRAM_FORMAT_ASCII_ARB
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB
#define GL_FRAGMENT_PROGRAM_ARB
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
#define GL_DEBUG_TYPE_PORTABILITY_ARB
#define GL_FRAMEBUFFER_SRGB
#define GL_LINES_ADJACENCY
#define GL_COLOR_ATTACHMENT0
#define GL_RASTERIZER_DISCARD
#define GL_TEXTURE_SHADER_NV
#define GL_TEXTURE_CUBE_MAP_SEAMLESS
#define GL_TRIANGLE_STRIP_ADJACENCY
#define GL_TEXTURE_CUBE_MAP_ARB
#define GL_ALL_BARRIER_BITS
#define GL_DEBUG_TYPE_PERFORMANCE_ARB
GLenum GLuint GLint GLenum face
#define GL_TEXTURE_BUFFER
#define GL_FIRST_VERTEX_CONVENTION_EXT
#define GL_RENDERBUFFER_HEIGHT
#define GL_WEIGHT_SUM_UNITY_ARB
#define GL_PREVIOUS_TEXTURE_INPUT_NV
#define GL_FRAMEBUFFER_COMPLETE
#define GL_DRAW_FRAMEBUFFER
#define GL_TEXTURE_BINDING_2D_ARRAY
#define GL_TEXTURE_1D_ARRAY
#define GL_CLIP_DISTANCE0
GLuint GLsizei GLsizei * length
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB
#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY
#define GL_TRIANGLES_ADJACENCY
#define GL_LINE_STRIP_ADJACENCY
#define GL_TEXTURE_2D_MULTISAMPLE
#define GL_DEBUG_TYPE_ERROR_ARB
#define GL_FIRST_VERTEX_CONVENTION
#define GL_READ_FRAMEBUFFER
#define GL_TEXTURE_SAMPLES
#define GL_TEXTURE_RECTANGLE_ARB
#define GL_DEPTH_ATTACHMENT
#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
#define GL_TEXTURE_CUBE_MAP_ARRAY
#define GL_COORD_REPLACE_ARB
#define GL_RENDERBUFFER_INTERNAL_FORMAT
#define GL_TEXTURE_BINDING_RECTANGLE_ARB
#define GL_ELEMENT_ARRAY_BUFFER
#define GL_TEXTURE_2D_ARRAY
#define GL_TEXTURE_BINDING_2D_MULTISAMPLE
#define GL_TEXTURE_LOD_BIAS_EXT
#define GL_PATCH_VERTICES
#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
GLsizeiptr const GLvoid GLenum usage
#define GL_STENCIL_ATTACHMENT
#define GL_DRAW_INDIRECT_BUFFER
#define GL_POINT_SPRITE_COORD_ORIGIN
#define GL_COPY_READ_BUFFER
#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY
#define GL_TEXTURE_FILTER_CONTROL_EXT
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
#define memcpy(s1, s2, n)
struct task_struct * current
static IPrintDialogCallback callback
static char memory[1024 *256]
static void stream_info(IStream *stream, HGLOBAL *hmem, int *size, int *pos)
unsigned __int3264 UINT_PTR
static HGLRC(WINAPI *pwglCreateContextAttribsARB)(HDC hDC
png_const_structrp png_const_inforp int * unit
png_structrp int int num_weights
static void * heap_calloc(SIZE_T count, SIZE_T size)
#define LIST_FOR_EACH_ENTRY(elem, list, type, field)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
__WINE_SERVER_LIST_INLINE struct list * list_tail(const struct list *list)
static PIXELFORMATDESCRIPTOR pfd
struct wined3d_fence * fence
struct wined3d_resource resource
struct wined3d_device * device
struct wined3d_context::@301 current_rt
const struct wined3d_gl_info * gl_info
struct wined3d_swapchain * swapchain
unsigned int sub_resource_idx
const struct wined3d_d3d_info * d3d_info
BOOL ffp_generic_attributes
struct wined3d_d3d_limits limits
struct wined3d_ffp_attrib_ops ffp_attrib_ops
unsigned int group_count_y
unsigned int group_count_x
unsigned int group_count_z
union wined3d_dispatch_parameters::@297 u
struct wined3d_direct_dispatch_parameters direct
struct wined3d_direct_draw_parameters direct
union wined3d_draw_parameters::@298 u
struct wined3d_rendertarget_view * depth_stencil
struct wined3d_rendertarget_view * render_targets[MAX_RENDER_TARGET_VIEWS]
union wined3d_gl_fence_object object
struct wined3d_context * context
wined3d_ffp_texcoord_func texcoord[WINED3D_FFP_EMIT_COUNT]
wined3d_ffp_attrib_func position[WINED3D_FFP_EMIT_COUNT]
wined3d_generic_attrib_func generic[WINED3D_FFP_EMIT_COUNT]
wined3d_ffp_attrib_func normal[WINED3D_FFP_EMIT_COUNT]
wined3d_ffp_attrib_func specular[WINED3D_FFP_EMIT_COUNT]
wined3d_ffp_attrib_func diffuse[WINED3D_FFP_EMIT_COUNT]
BOOL supported[WINED3D_GL_EXT_COUNT]
struct opengl_funcs gl_ops
struct wined3d_gl_limits limits
struct wined3d_fbo_ops fbo_ops
DWORD selected_gl_version
struct wined3d_buffer * buffer
struct wined3d_context * context
union wined3d_gl_pipeline_statistics_query u
struct wined3d_context * context
struct wined3d_gl_view gl_view
unsigned int sub_resource_idx
struct wined3d_resource * resource
struct wined3d_resource * resource
struct wined3d_gl_view gl_view
const struct wined3d_format * format
unsigned int sub_resource_idx
int offscreen_rendering_mode
BOOL strict_draw_ordering
enum wined3d_shader_resource_type type
enum wined3d_shader_type type
struct wined3d_pixel_shader ps
struct wined3d_context * context
union wined3d_gl_so_statistics_query u
struct wined3d_stream_info_element elements[MAX_ATTRIBS]
const struct wined3d_renderbuffer_entry * current_renderbuffer
struct wined3d_texture * container
struct wined3d_texture ** back_buffers
struct wined3d_context ** context
const struct wined3d_format * ds_format
struct wined3d_texture * front_buffer
struct wined3d_device * device
struct gl_texture texture_rgb texture_srgb
struct wined3d_swapchain * swapchain
struct wined3d_resource resource
struct wined3d_texture::wined3d_texture_sub_resource sub_resources[1]
struct wined3d_context * context
#define new(TYPE, numElems)
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
BOOL WINAPI wglDeleteContext(HGLRC hglrc)
HDC WINAPI wglGetCurrentDC(void)
HGLRC WINAPI wglGetCurrentContext(void)
HGLRC WINAPI wglCreateContext(HDC hdc)
BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
BOOL WINAPI wglShareLists(HGLRC hglrcSrc, HGLRC hglrcDst)
#define WGL_CONTEXT_MINOR_VERSION_ARB
#define GL_DEBUG_TYPE_PORTABILITY
#define GL_PRIMITIVE_RESTART_FIXED_INDEX
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
#define GL_TEXTURE_TARGET
#define WGL_CONTEXT_MAJOR_VERSION_ARB
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR
#define WGL_CONTEXT_DEBUG_BIT_ARB
#define WGL_TYPE_RGBA_ARB
#define WGL_CONTEXT_FLAGS_ARB
#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB
#define GL_DEBUG_TYPE_ERROR
#define GL_DEBUG_OUTPUT_SYNCHRONOUS
#define GL_FRAMEBUFFER_DEFAULT_HEIGHT
#define GL_DISPATCH_INDIRECT_BUFFER
#define GL_FRAMEBUFFER_DEFAULT_LAYERS
#define GL_FRAMEBUFFER_DEFAULT_SAMPLES
#define GL_FRAMEBUFFER_DEFAULT_WIDTH
#define GL_NEGATIVE_ONE_TO_ONE
#define GL_DEBUG_TYPE_PERFORMANCE
#define success(from, fromstr, to, tostr)
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain)
struct wined3d_context * swapchain_get_context(struct wined3d_swapchain *swapchain)
HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain)
#define WINED3D_TS_WORLD_MATRIX(index)
@ WINED3D_DECL_USAGE_BLEND_INDICES
@ WINED3D_DECL_USAGE_NORMAL
@ WINED3D_DECL_USAGE_PSIZE
@ WINED3D_DECL_USAGE_BLEND_WEIGHT
@ WINED3D_DECL_USAGE_POSITION
@ WINED3D_DECL_USAGE_COLOR
@ WINED3D_DECL_USAGE_POSITIONT
@ WINED3D_DECL_USAGE_TEXCOORD
#define WINED3DDP_MAXTEXCOORD
@ WINED3D_RS_STENCILENABLE
@ WINED3D_RS_SCISSORTESTENABLE
@ WINED3D_RS_SRGBWRITEENABLE
@ WINED3D_RS_ALPHABLENDENABLE
@ WINED3D_RS_FOGTABLEMODE
@ WINED3D_RS_ZWRITEENABLE
@ WINED3D_RS_POINTSPRITEENABLE
@ WINED3D_RS_SPECULARENABLE
@ WINED3D_RS_FOGVERTEXMODE
@ WINED3D_RS_ALPHATESTENABLE
@ WINED3D_SAMP_SRGB_TEXTURE
@ WINED3D_RTYPE_TEXTURE_2D
@ WINED3D_RTYPE_TEXTURE_3D
#define WINED3DTA_SELECTMASK
#define WINED3DSTREAMSOURCE_INSTANCEDATA
#define WINED3D_OUTPUT_SLOT_UNUSED
#define WINED3D_NO_PRIMITIVE_RESTART
@ WINED3D_TSS_TEXCOORD_INDEX
@ WINED3DFMT_B4G4R4A4_UNORM
@ WINED3DFMT_B8G8R8A8_UNORM
@ WINED3DFMT_B8G8R8X8_UNORM
@ WINED3DFMT_R32G32B32A32_FLOAT
@ WINED3DFMT_B4G4R4X4_UNORM
@ WINED3D_TOP_SELECT_ARG1
@ WINED3D_TOP_MULTIPLY_ADD
@ WINED3D_TOP_BUMPENVMAP_LUMINANCE
@ WINED3D_TOP_SELECT_ARG2
#define WINED3D_OUTPUT_SLOT_SEMANTIC
#define WINED3D_MAP_WRITE
#define WINED3D_HIGHEST_TEXTURE_STATE
#define WINED3D_LEGACY_FFP_LIGHTING
@ WINED3D_INPUT_PER_INSTANCE_DATA
#define WINED3D_LEGACY_CUBEMAP_FILTERING
#define WINED3DTA_TEXTURE
#define WINED3DUSAGE_DEPTHSTENCIL
static enum wined3d_render_state WINED3D_RS_COLORWRITE(int index)
@ ARB_TEXTURE_BUFFER_OBJECT
@ ARB_PIPELINE_STATISTICS_QUERY
@ ARB_DRAW_ELEMENTS_BASE_VERTEX
@ WINED3D_GL_PRIMITIVE_QUERY
@ WGL_WINE_PIXEL_FORMAT_PASSTHROUGH
@ ARB_TEXTURE_MULTISAMPLE
@ ARB_FRAGMENT_COORD_CONVENTIONS
@ ARB_FRAMEBUFFER_NO_ATTACHMENTS
@ WINED3D_GL_LEGACY_CONTEXT
@ ARB_TRANSFORM_FEEDBACK2
@ ARB_TEXTURE_CUBE_MAP_ARRAY
#define WINED3D_FBO_ENTRY_FLAG_STENCIL
static BOOL use_indexed_vertex_blending(const struct wined3d_state *state, const struct wined3d_stream_info *si)
static unsigned int wined3d_texture_get_level_height(const struct wined3d_texture *texture, unsigned int level)
#define MAX_FRAGMENT_SAMPLERS
#define MAX_VERTEX_SAMPLERS
#define WINED3D_LOCATION_TEXTURE_SRGB
static int wined3d_bit_scan(unsigned int *x)
@ WINED3D_FFP_BLENDWEIGHT
@ WINED3D_FFP_BLENDINDICES
static unsigned int wined3d_texture_get_level_pow2_height(const struct wined3d_texture *texture, unsigned int level)
@ WINED3D_FFP_EMIT_FLOAT2
@ WINED3D_FFP_EMIT_UBYTE4
@ WINED3D_FFP_EMIT_FLOAT4
@ WINED3D_FFP_EMIT_FLOAT3
#define STATE_TRANSFORM(a)
#define MAKEDWORD_VERSION(maj, min)
static BOOL use_vs(const struct wined3d_state *state)
static unsigned int wined3d_texture_get_level_width(const struct wined3d_texture *texture, unsigned int level)
#define WINED3DFMT_FLAG_SRGB_WRITE
static unsigned int surface_get_sub_resource_idx(const struct wined3d_surface *surface)
static BOOL wined3d_dualblend_enabled(const struct wined3d_state *state, const struct wined3d_gl_info *gl_info)
#define WINED3D_LOCATION_BUFFER
static struct wined3d_surface * wined3d_rendertarget_view_get_surface(const struct wined3d_rendertarget_view *view)
#define MAX_UNORDERED_ACCESS_VIEWS
#define WINED3D_FBO_ENTRY_FLAG_DEPTH
#define WINED3D_LOCATION_RB_RESOLVED
#define WINED3D_SAMPLER_DEFAULT
static BOOL use_software_vertex_processing(const struct wined3d_device *device)
static unsigned int wined3d_texture_get_level_pow2_width(const struct wined3d_texture *texture, unsigned int level)
#define STATE_IS_COMPUTE(a)
#define MAX_RENDER_TARGET_VIEWS
#define STATE_SCISSORRECT
static BOOL is_rasterization_disabled(const struct wined3d_shader *geometry_shader)
#define MAX_RENDER_TARGETS
#define STATE_SAMPLER(num)
static GLenum wined3d_texture_get_sub_resource_target(const struct wined3d_texture *texture, unsigned int sub_resource_idx)
static void wined3d_color_from_d3dcolor(struct wined3d_color *wined3d_color, DWORD d3d_color)
@ WINED3D_PIPELINE_COMPUTE
@ WINED3D_PIPELINE_GRAPHICS
static BOOL needs_srgb_write(const struct wined3d_context *context, const struct wined3d_state *state, const struct wined3d_fb_state *fb)
@ WINED3D_GL_RES_TYPE_TEX_2D
#define WINED3D_LOCATION_TEXTURE_RGB
#define STATE_COMPUTE_OFFSET
#define WINED3D_SHADER_CONST_PS_Y_CORR
#define WINED3D_LOCATION_DRAWABLE
#define STATE_POINTSPRITECOORDORIGIN
static GLuint wined3d_texture_get_texture_name(const struct wined3d_texture *texture, const struct wined3d_context *context, BOOL srgb)
@ WINED3D_SHADER_TYPE_HULL
@ WINED3D_SHADER_TYPE_PIXEL
@ WINED3D_SHADER_TYPE_GEOMETRY
@ WINED3D_SHADER_TYPE_GRAPHICS_COUNT
@ WINED3D_SHADER_TYPE_DOMAIN
@ WINED3D_SHADER_TYPE_COMPUTE
@ WINED3D_SHADER_TYPE_VERTEX
@ WINED3D_SHADER_TYPE_COUNT
static BOOL use_ps(const struct wined3d_state *state)
#define WINED3DFMT_FLAG_FLOAT
static void wined3d_from_cs(const struct wined3d_cs *cs)
#define STATE_TEXTURESTAGE(stage, num)
#define STATE_INDEXBUFFER
#define MAX_COMBINED_SAMPLERS
#define WINED3DFMT_FLAG_STENCIL
#define WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING
#define WINED3D_LOCATION_RB_MULTISAMPLE
#define WINED3DFMT_FLAG_DEPTH
static BOOL isStateDirty(const struct wined3d_context *context, DWORD state)
#define STATE_FRAMEBUFFER
#define WINED3D_UNMAPPED_STAGE
static struct wined3d_texture * texture_from_resource(struct wined3d_resource *resource)
static struct wined3d_buffer * buffer_from_resource(struct wined3d_resource *resource)
#define WINED3D_FBO_ENTRY_FLAG_ATTACHED
int WINAPI ChoosePixelFormat(_In_ HDC hdc, _In_ const PIXELFORMATDESCRIPTOR *ppfd)
BOOL WINAPI SetPixelFormat(_In_ HDC, _In_ int, _In_ const PIXELFORMATDESCRIPTOR *)
#define PFD_SUPPORT_OPENGL
#define PFD_DRAW_TO_WINDOW
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
BOOL WINAPI IsWindow(_In_opt_ HWND)
HWND WINAPI WindowFromDC(_In_ HDC hDC)
HDC WINAPI GetDCEx(_In_opt_ HWND, _In_opt_ HRGN, _In_ DWORD)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)