Commit Graph

7987 Commits

Author SHA1 Message Date
Henri Verbeet ca6014b19a wined3d: Return success in wined3d_buffer_load_location() when the location is already current.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:52 +01:00
Henri Verbeet afb2aa2512 wined3d: Try to avoid stalling on dynamic buffer maps.
Particularly for applications that use dynamic buffers without
WINED3D_MAP_DISCARD/WINED3D_MAP_NOOVERWRITE.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:52 +01:00
Henri Verbeet efdb898bef wined3d: Evict system memory for dynamic buffers on the first WINED3D_MAP_DISCARD map.
Mostly to avoid making things worse for applications that map dynamic buffers
without WINED3D_MAP_DISCARD/WINED3D_MAP_NOOVERWRITE.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:52 +01:00
Henri Verbeet a5f7aff3bb wined3d: Do not upload data in buffer_create_buffer_object().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:52 +01:00
Henri Verbeet 451e137c1b wined3d: Do not evict the system memory copy in buffer_create_buffer_object().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:52 +01:00
Jarkko Korpi b380450ad4 wined3d: Add Rx 460 binary driver.
Signed-off-by: Jarkko Korpi <jarkko_korpi@hotmail.com>=
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-30 21:38:52 +01:00
Józef Kucia 832b7ee727 wined3d: Implement SM5 bfrev 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-01-30 21:38:50 +01:00
Józef Kucia 8ef73e88c1 wined3d: Add ARB_gpu_shader5 extension.
For SM5 bitwise instructions.

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-01-30 21:38:50 +01:00
Józef Kucia 00ccd6fd99 wined3d: Implement SM5 f32tof16 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-01-30 21:38:49 +01:00
Józef Kucia b8fb617712 wined3d: Implement SM5 f16tof32 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-01-30 21:38:49 +01:00
Józef Kucia 1ea53005e7 wined3d: Add ARB_shading_language_packing extension.
For f32tof16 and f16tof32 instructions.

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-01-30 21:38:49 +01:00
Matteo Bruni 69006a7cc6 wined3d: If the format is not FBO attachable disable sRGB writes only.
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-01-30 21:38:49 +01:00
Matteo Bruni 9fc3444d6e wined3d: Correctly handle GL implementations not supporting sRGB FBO attachments.
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-01-30 21:38:49 +01:00
Józef Kucia 63b8360e4d wined3d: Implement buffer samplers.
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-01-27 16:31:45 +01:00
Henri Verbeet b924ccb699 wined3d: Check buffer->map_ptr to determine if the buffer object is mapped.
Instead of trying to replicate the wined3d_buffer_map() logic in
wined3d_buffer_unmap().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:45 +01:00
Henri Verbeet 7a18b2473f wined3d: Introduce wined3d_buffer_evict_sysmem().
For consistency with the texture code.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:45 +01:00
Henri Verbeet 6a70c55615 wined3d: Rename WINED3D_BUFFER_DOUBLEBUFFER to WINED3D_BUFFER_PIN_SYSMEM.
For consistency with the texture code.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:45 +01:00
Henri Verbeet a11e301566 wined3d: Introduce wined3d_buffer_upload_ranges().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:45 +01:00
Henri Verbeet 602a23a60a wined3d: Just use glBufferSubData() in buffer_direct_upload().
It might seem like a good idea to try to use glMapBufferRange() in
buffer_direct_upload(), but it really isn't. The interesting cases for
glMapBufferRange() are GL_MAP_INVALIDATE_BUFFER_BIT or
GL_MAP_UNSYNCHRONIZED_BIT, but the only way for those to be set here
would be for the buffer to be mapped with WINED3D_MAP_DISCARD or
WINED3D_MAP_NOOVERWRITE before the buffer object was created. In that
case the GPU is obviously not using the buffer object, so
glMapBufferRange() doesn't help. On the other hand, if the buffer is
currently in use by the application and neither WINED3D_MAP_DISCARD nor
WINED3D_MAP_NOOVERWRITE is set, glMapBufferRange() would need to wait
for the GPU to finish using the buffer object, while glBufferSubData()
may decide not to.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:44 +01:00
Józef Kucia 65089c395d wined3d: Do not pass LOD to texelFetch() for buffer resources.
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-01-26 16:57:50 +01:00
Józef Kucia 8187817830 wined3d: Add initial support for shader buffer views.
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-01-26 16:57:48 +01:00
Józef Kucia e800093706 wined3d: Create dummy buffer textures.
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-01-26 16:57:46 +01:00
Józef Kucia 8305719456 wined3d: Add ARB_texture_buffer_object extension.
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-01-26 16:57:44 +01:00
Henri Verbeet 7757ecfc70 wined3d: Only store light type counts in struct wined3d_ffp_vs_settings.
The ordering doesn't matter, so this avoids creating some redundant shader
variants.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:56:06 +01:00
Henri Verbeet 7c5fd62efc wined3d: Get rid of the "onscreen_depth_stencil" field from struct wined3d_device.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:56:03 +01:00
Henri Verbeet 41738baea2 wined3d: Get rid of surface_modify_ds_location().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:56:00 +01:00
Henri Verbeet 35e651caf1 wined3d: Get rid of the "ds_current_size" field from struct wined3d_surface.
This should be unused now that surface_load_ds_location() is gone.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:55:57 +01:00
Henri Verbeet adf8493566 wined3d: Simplify shader_glsl_load_np2fixup_constants().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:55:55 +01:00
Józef Kucia 0c2479e355 wined3d: Remove inaccurate comments.
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-01-25 15:54:33 +01:00
Józef Kucia f24dee797c wined3d: Introduce wined3d_device_set_compute_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-01-25 15:54:29 +01:00
Henri Verbeet 1bd56b6ca5 wined3d: Get rid of surface_load_ds_location().
This should be unused now that "AlwaysOffscreen" is gone.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:46 +01:00
Henri Verbeet ff85cd5f4a wined3d: Get rid of the "AlwaysOffscreen" setting.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:42 +01:00
Henri Verbeet c93f2e3f85 wined3d: Use the depth/stencil view to acquire a context for depth-only draws.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:39 +01:00
Henri Verbeet 87c6ac4258 wined3d: Get rid of a superfluous floatBitsToUint() in shader_glsl_texkill().
shader_glsl_add_src_param() already adds floatBitsToUint().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:35 +01:00
Adam Bolte 3312b4b51c wined3d: Add GPU information for AMD FIJI.
Signed-off-by: Adam Bolte <abolte@systemsaviour.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:23:48 +01:00
Henri Verbeet 332a6ff916 wined3d: Add GPU information for AMD TONGA.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-18 15:44:06 +01:00
Michael Müller 5fd9344362 wined3d: Do not set DDCAPS_ALIGNBOUNDARYSRC caps for ddraw.
Signed-off-by: Michael Müller <michael@fds-team.de>
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-01-16 16:54:41 +01:00
Michael Cronenworth 58056728cd wined3d: Add Iris Haswell PCI ids and descriptions.
Signed-off-by: Michael Cronenworth <mike@cchtml.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-13 14:51:23 +01:00
Józef Kucia 06cf77b343 wined3d: Update "screen_format" when ChangeDisplaySettingsEx() call is redundant.
This fixes a regression introduced by commit
f6dde70624.

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-01-12 14:09:10 +01:00
Henri Verbeet 459afa4791 wined3d: Use winediag for the backbuffer offscreen rendering message.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-11 16:03:59 +01:00
Henri Verbeet 24d71ad7e7 wined3d: Fully initialise "settings" in wined3d_ffp_get_vs_settings().
Commit b62f4139ed introduced implicit padding in
the wined3d_ffp_vs_settings structure. This causes redundant shader variants
to be generated. Although easy to avoid, there's also something to be said for
being more robust against padding.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-09 20:49:11 +01:00
Francois Gouget 551705d65f wined3d: Make some functions static.
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-01-09 20:49:10 +01:00
Henri Verbeet 5d470a6e7f wined3d: Pass GL_SYNC_FLUSH_COMMANDS_BIT to glClientWaitSync() if WINED3DGETDATA_FLUSH was specified.
Otherwise the application may keep spinning on wined3d_query_get_data() in
case the query wasn't submitted to the GPU yet when wined3d_query_get_data()
was called. This issue was exposed by commit
70889d6866. Note that this won't fix the issue
if the query was created in a different GL context.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-04 11:11:21 +01:00
Henri Verbeet 9a789feb81 wined3d: Only check rtv and dsv bindings in device_resource_released() when D3D is initialised.
This fixes a regression introduced by commit
4a9304305a.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-04 11:11:16 +01:00
Henri Verbeet c7c0415689 ddraw: Keep an explicit reference to the wined3d device in surfaces.
Version 1 and version 2 surfaces don't keep references to the ddraw interface
that created them, so such surfaces may get destroyed after the corresponding
ddraw object was destroyed. Wined3d requires that the device is destroyed
after all its resources are destroyed. In principle this issue always existed,
but it was probably made worse by changes in the texture cleanup code.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-04 11:11:09 +01:00
Jarkko Korpi 7912563f7f wined3d: Add Amd Rx 480 binary driver.
Signed-off-by: Jarkko Korpi <jarkko_korpi@hotmail.com>=
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-02 20:27:55 +01:00
Józef Kucia 6b94fb1e4a wined3d: Always check if context window needs to be updated.
Fixes a regression introduced by commit
8673dca87d.

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>
2016-12-19 11:06:00 +01:00
Józef Kucia f752c09791 wined3d: Remove depth/stencil format flags from typeless formats.
We have separate formats for depth/stencil typeless formats. This fixes
blits for R32_TYPELESS and R16_TYPELESS formats.

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>
2016-12-16 13:19:51 +01:00
Józef Kucia e2e0c747a8 wined3d: Filter messages for fullscreen mode changes.
This fixes a regression introduced by commit
d9f8cba50f.

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>
2016-12-14 10:32:44 +01:00
Józef Kucia 5e4e2a1535 wined3d: Recognize SM5 atomic_imin opcode.
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>
2016-12-12 19:40:43 +01:00