Commit Graph

8521 Commits

Author SHA1 Message Date
Henri Verbeet 56128d18d4 wined3d: Drop the special case for "converted" surfaces in wined3d_surface_blt().
We still want to avoid invalidating the system memory copy for these surfaces,
but we've become a lot better at preserving the current location for
resources, to the point that the special case actually hurts. In particular,
if the resource wasn't already current on the CPU, using the CPU blitter would
cause us to read it back, which is what we're trying to avoid.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet 990be0ba50 wined3d: Avoid using the CPU blitter for clearing converted surfaces that aren't current on the CPU.
Since that would imply reading them back, with associated format conversion.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet 92d030c41e wined3d: Avoid using the CPU blitter for clearing either depth or stencil on combined formats.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet a9a5f371ae wined3d: Split combined render target and depth/stencil clears if needed in ffp_blitter_clear().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet b8e0af67f5 wined3d: Simplify the render target check in ffp_blitter_clear().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet 95e42a8d19 wined3d: Handle WINED3D_POOL_SYSTEM_MEM resources in ffp_blitter_use_cpu_clear().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet 864bef4c19 wined3d: Make a FIXME in cpu_blitter_clear() slightly more accurate.
The issue isn't so much stencil clears as clearing either depth or stencil on
formats that contain both.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-17 22:12:09 +02:00
Henri Verbeet 7578e09801 wined3d: Fix the WINED3DFMT_D24_UNORM_S8_UINT entry in wined3d_format_convert_from_float().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-14 10:52:06 +02:00
Józef Kucia af80b7afdd wined3d: Implement SM5 swapc instruction.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:42:03 +02:00
Sebastian Lackner c683372bca wined3d: Return hr result in wined3d_event_query_create.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:42:01 +02:00
Józef Kucia c45b908abc wined3d: Introduce wined3d fence objects.
Use fences for the APPLESYNC codepath, and implement event queries
on top of fences.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:10 +02:00
Józef Kucia 11c902ebc7 wined3d: Clean up buffer_sync_apple().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:10 +02:00
Józef Kucia 0edb71a35f wined3d: Avoid creating event queries manually.
Fixes a regression introduced by commit
be20ddc38b.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-10 20:51:10 +02:00
Sebastian Lackner 7fbdb54ee4 wined3d: Trigger frontbuffer update in surface_cpu_blt.
Fixes a regression introduced in ee17d7ba1b.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 19:20:06 +02:00
Sebastian Lackner a77d957da8 wined3d: Fix memory leaks in blitter_destroy callbacks.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 09:48:24 +02:00
Sebastian Lackner 6dd1ca28bf wined3d: Create CPU blitter also for GDI render.
Fixes a regression introduced in cad4badbcf.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 09:48:22 +02:00
Sebastian Lackner a2c0d2bb37 wined3d: Avoid NULL pointer dereference when using GDI renderer.
Fixes a regression introduced in 62ca4f3826.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-19 09:48:19 +02:00
Józef Kucia 2b77c00b8f wined3d: Do not declare pixel shader inputs when they are not used.
This is a workaround for a bug in Mesa GLSL linker. The bug is triggered
by GLSL generated for SM3 shaders when shader inputs are not read and
interface blocks are used for shader inputs/outputs (core profile code
path).

Declarations for unused shader inputs are not generated for pixel
shaders. We still declare shader outputs in the previous shader stage,
but it's allowed by the GLSL 1.50 spec:

  "Only output variables that are read by the subsequent pipeline stage
  need to be written; it is allowed to have superfluous declarations of
  output variables."

The table in section 4.3.4 (Input Variables) of the GLSL 4.20 spec even
more explicitly allows shader output variables with no matching input
variables declared in the consuming shader.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-13 20:56:19 +02:00
Henri Verbeet 1d3a8a5ded wined3d: Also check for "Mesa" in GL_VERSION in wined3d_guess_gl_vendor().
The existing checks should be sufficient, but the GL_VERSION one is
potentially more reliable.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-12 18:30:12 +02:00
Henri Verbeet e0e4f9bbcd wined3d: Use WINED3D_CS_QUEUE_MAP for WINED3D_CS_OP_UPDATE_SUB_RESOURCE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-07 22:55:07 +02:00
Józef Kucia 10748ab9d8 wined3d: Rearrange wined3d_query_type enum values.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:47:40 +02:00
Józef Kucia 54a0ce3685 wined3d: Introduce get_query_result64() helper function.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:47:38 +02:00
Michael Müller f52ead4b4d wined3d: Implement WINED3D_QUERY_TYPE_PIPELINE_STATISTICS.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:47:31 +02:00
Francois Gouget 2dc2db772c wined3d: Add a trailing newline to an ERR() message.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-05 19:47:08 +02:00
Józef Kucia d968d32a1b wined3d: Correctly handle phase instance ID register when ARB_shading_language_pack420 is not supported.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:46 +02:00
Józef Kucia 9128ec0bce wined3d: Extend wined3d_check_device_format() to allow querying general format support.
For D3D10+.

When WINED3D_RTYPE_NONE is passed the wined3d_check_device_format()
function checks if a format is supported for all reasonable resource
types for a given usage. For now render target and depth stencil support
can be queried using this method.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:45 +02:00
Józef Kucia dbcd2ecc1e wined3d: Prefer GLSL 1.50 shaders in draw_test_quad().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:45 +02:00
Henri Verbeet a61cfe0fd7 wined3d: Validate parameter lengths in shader_sm4_read_param() (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:45 +02:00
Henri Verbeet 986adeef96 wined3d: Validate parameter lengths in shader_sm4_read_src_param() (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:45 +02:00
Henri Verbeet a5b4dedadd wined3d: Validate parameter lengths in shader_sm4_read_dst_param() (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:45 +02:00
Henri Verbeet 3821dcf996 wined3d: Only warn about 0 compare functions in wined3d_gl_compare_func().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-31 20:51:44 +02:00
Józef Kucia 0d9ce15ff6 wined3d: Use ARRAY_SIZE() in wined3d_format_get_color_key_conversion().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:55 +02:00
Józef Kucia cc84b252ff wined3d: Use ARRAY_SIZE() in init_format_filter_info().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:55 +02:00
Józef Kucia 0d3dc7c971 wined3d: Bind frag data location for core context draw quad shader.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:55 +02:00
Michael Müller 93c349c9c7 wined3d: Don't leak free_so_statistics_queries on device destruction.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:55 +02:00
Józef Kucia 7955ce42fc wined3d: Fix FFP lighting.
Fixes a regression introduced by commit
c329ee5673.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:12:49 +02:00
Józef Kucia f20bdd8dee wined3d: Remove outdated comment in CheckRenderTargetCapability().
The WINED3DFMT_FLAG_RENDERTARGET flag is cleared in
init_format_fbo_compat_info().

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:04:02 +02:00
Józef Kucia fca7f78ea0 wined3d: Do not bother to check identity fixup support.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:04:00 +02:00
Józef Kucia 229d4aa7bc wined3d: Trace color fixup checks in apply_format_fixups().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:03:58 +02:00
Józef Kucia be20ddc38b wined3d: Introduce query operation to destroy queries.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:03:55 +02:00
Józef Kucia 0a923d5233 wined3d: Require just specific OpenGL extensions and SM4 support for SM5.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-30 11:03:53 +02:00
Józef Kucia 1eb642aaf2 wined3d: Try harder to keep the current context.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:47 +02:00
Józef Kucia dfa3be5c9d wined3d: Implement SO statistics queries.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:47 +02:00
Józef Kucia aff0cbb9c7 wined3d: Implement hull shader vocp register.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:46 +02:00
Józef Kucia 4597ef6696 wined3d: Avoid barrier() in tessellation control shader if possible.
Synchronization is only needed when output variables are read.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:46 +02:00
Józef Kucia 114f9791d2 wined3d: Do not use "temporary" bit field for SM4+ shaders.
Avoids generating needless variables for temporary registers in hull
shaders.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:46 +02:00
Józef Kucia ac1d2f1e2f wined3d: Generate variables for control point phase temporary registers.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:46 +02:00
Henri Verbeet 0597842218 wined3d: Only warn about 0 stencil ops in gl_stencil_op().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:46 +02:00
Henri Verbeet cb77e188d1 wined3d: Validate constant buffer alignment.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:45 +02:00
Henri Verbeet 0726d7e82f wined3d: Fix "sysmem_count" accounting in wined3d_texture_invalidate_location().
Only increase it if the sub-resource wasn't already exclusively in system
memory.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-25 20:47:45 +02:00