Commit Graph

8534 Commits

Author SHA1 Message Date
Józef Kucia 2100e140ca wined3d: Change wined3d_buffer_copy() return type to void.
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-08-08 20:02:03 +09:00
Józef Kucia e7f1559a8d wined3d: Add support for initial UAV counters 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-08-08 20:02:01 +09:00
Józef Kucia 24c39103be wined3d: Implement copying UAV counters.
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-08-08 20:01:54 +09:00
Józef Kucia 5d71c48cb3 wined3d: Factor out context_copy_bo_address() 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-08-08 20:01:49 +09:00
Henri Verbeet f7e37715fa wined3d: Use the context information in context_set_pixel_format().
Instead of passing it around.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 20:20:09 +02:00
Henri Verbeet 3441ba9e03 wined3d: Properly update the context when falling back to the backup window in context_set_gl_context().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 20:19:59 +02:00
Henri Verbeet 6a5c372541 wined3d: Only flush valid contexts in wined3d_cs_exec_flush().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 20:19:50 +02:00
Józef Kucia 0e2f75b2f6 wined3d: Update ARB_pipeline_statistics_query extension detection.
ARB_pipeline_statistics_query is included in OpenGL 4.6.

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-08-01 14:08:15 +02:00
Henri Verbeet cc16e0d2de wined3d: Validate vertex shader input signature register indices (AFL).
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-25 16:10:17 +02:00
Józef Kucia a6d26527c6 wined3d: Implement forceEarlyDepthStencil shader global flag.
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-24 18:58:30 +02:00
Alexandre Julliard 548382e634 wined3d: Make sure we are still using the correct window before setting pixel format.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:33 +02:00
Józef Kucia 5151b80b2d wined3d: Translate ld_{raw, structured} instructions more carefully.
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-18 20:43:33 +02:00
Józef Kucia ffb72392b4 wined3d: Translate bfi, ubfe, ibfe instructions more carefully.
Makes sure that we do not overwrite source parameters for consecutive
GLSL function calls when the instruction is translated into multiple
lines.

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-18 20:43:33 +02:00
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