Józef Kucia
56ce1d3dec
wined3d: Do not generate FFP fragment shader when SM4 vertex shader is active.
...
We should not ever generate fixed-function replacement shaders in
D3D10+. It is perfectly valid to draw with NULL pixel shader, e.g. for
stream output.
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-03-22 15:34:13 +01:00
Henri Verbeet
0d0f3c940f
wined3d: Check for GL_FRONT before GL_BACK in wined3d_texture_get_gl_buffer().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:52:04 +01:00
Henri Verbeet
5ab99b1643
wined3d: Merge surface_blt_to_drawable() into surface_load_drawable().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:52:04 +01:00
Henri Verbeet
cbede20ae8
wined3d: Use blit_shader.blit_surface() in surface_blt_to_drawable().
...
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-03-21 20:52:01 +01:00
Henri Verbeet
8c9990157d
wined3d: Get rid of the (now) redundant "alpha_test" parameter to surface_blt_to_drawable().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-21 20:51:48 +01:00
Henri Verbeet
07a6637d7e
wined3d: Inline surface_blt_to_drawable() into ffp_blit_blit_surface().
...
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-03-21 20:51:46 +01:00
Józef Kucia
2c7381e329
wined3d: Remove irrelevant comment.
...
The transform_texture() function calls context_active_texture().
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-03-20 19:21:24 +01:00
Józef Kucia
de0a88538c
wined3d: Abort state application when there is problem with newly created sampler object.
...
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-03-20 19:21:23 +01:00
Józef Kucia
ec1da699d9
wined3d: Make wined3d samplers responsible for setting texture base level.
...
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-03-20 19:21:21 +01:00
Józef Kucia
591a3b1be8
wined3d: Use wined3d samplers unconditionally for applying legacy sampler states.
...
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-03-20 19:21:18 +01:00
Józef Kucia
584ec259b2
wined3d: Introduce wined3d_sampler_bind() 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-03-20 19:21:16 +01:00
Józef Kucia
f82a437a90
wined3d: Create wined3d sampler for NULL sampler.
...
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-03-20 19:21:14 +01:00
Józef Kucia
a7dadf2f95
wined3d: Create wined3d sampler for default sampler.
...
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-03-20 19:21:12 +01:00
Józef Kucia
993bcc3e13
wined3d: Make wined3d samplers usable when ARB_sampler_objects is not available.
...
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-03-20 19:21:08 +01:00
Henri Verbeet
d85d977a35
wined3d: Modify resource locations in wined3d_surface_blt() instead of the blitters.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:38 +01:00
Henri Verbeet
d5527c2d1c
wined3d: Only copy source/destination rectangles when needed in arbfp_blit_surface().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:36 +01:00
Henri Verbeet
717225bf9b
wined3d: Pass a context to blit_shader.blit_surface().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:34 +01:00
Henri Verbeet
ad46b67674
wined3d: Create and destroy surface DCs through the CS.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:25 +01:00
Henri Verbeet
d9d5dcee2b
wined3d: Avoid device_invalidate_state() in wined3d_texture_set_lod().
...
It's not safe to call device_invalidate_state() outside the CS.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-17 14:42:22 +01:00
Józef Kucia
c191c2a09d
wined3d: Fix off-by-one error in wined3d_gl_limits_get_texture_unit_range().
...
Spotted by Matteo Bruni.
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-03-16 15:03:10 +01:00
Huw Davies
7b32c8ab3e
wined3d: Zero-initialize count.
...
This prevents the loop below accessing beyond multisample_types
if the GL_NUM_SAMPLE_COUNTS call fails.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-16 15:03:05 +01:00
Józef Kucia
8ca5577ed1
wined3d: Recompute sampler count before allocating sampler range for compute 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-03-15 17:33:00 +01:00
Józef Kucia
09fa9fbcf1
wined3d: Store GL sampler limits as array.
...
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-03-15 17:32:58 +01:00
Józef Kucia
470767ef4a
wined3d: Get rid of redundant WARN() from context_load_shader_resources().
...
The context_bind_shader_resources() function prints the same warning
message.
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-03-15 17:32:54 +01:00
Józef Kucia
57757a3bd9
wined3d: Use context_get_tex_unit_mapping() in context_bind_shader_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-03-15 17:32:42 +01:00
Józef Kucia
2ac254a0ff
wined3d: Add support for samplers in geometry 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-03-14 17:14:41 +01:00
Józef Kucia
761d59f9c0
wined3d: Use layout qualifiers to bind GLSL 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-03-14 17:14:40 +01:00
Józef Kucia
12edaf9ad0
wined3d: Introduce context_get_tex_unit_mapping() 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-03-14 17:14:38 +01:00
Józef Kucia
1865352e3f
wined3d: Allow using more than MAX_COMBINED_SAMPLERS texture image units.
...
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-03-14 17:14:36 +01:00
Józef Kucia
ea6c61a534
wined3d: Do not use texture unit mapping for SM4+ 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-03-14 17:14:34 +01:00
Józef Kucia
9d3b2958ca
wined3d: Use layout qualifiers to bind GLSL uniform blocks.
...
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-03-14 17:14:32 +01:00
Józef Kucia
3567544ade
wined3d: Use layout qualifiers to bind GLSL images.
...
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-03-14 17:14:30 +01:00
Matteo Bruni
630ba97900
wined3d: Fix the TRACE in wined3d_texture_remove_buffer_object().
...
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-03-14 17:14:13 +01:00
Bruno Jesus
992dcc4db5
wined3d: Recognize GeForce 940M.
...
Signed-off-by: Bruno Jesus <bjesus@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-14 17:14:01 +01:00
Józef Kucia
23d28c451b
wined3d: Introduce shader_glsl_load_program_resources() 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-03-13 19:28:45 +01:00
Józef Kucia
d89ee7aaaa
wined3d: Move legacy texture image unit range allocation to wined3d_gl_limits_get_texture_unit_range().
...
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-03-13 19:28:43 +01:00
Józef Kucia
806479e432
wined3d: Get rid of incorrect usage of "tex_unit_map".
...
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-03-13 19:28:41 +01:00
Józef Kucia
f2af535c05
wined3d: Simplify computation of "num_textures_used" in ATI fragment pipeline.
...
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-03-13 19:28:39 +01:00
Józef Kucia
a0f2b5b932
wined3d: Recognize SM4 dcl_index_range 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>
2017-03-10 23:21:25 +01:00
Józef Kucia
2059beda57
wined3d: Implement SM4 umul 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-03-10 23:21:24 +01:00
Józef Kucia
5f4e49dea6
wined3d: Recognize SM4 umul 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>
2017-03-10 23:21:24 +01:00
Matteo Bruni
72deec5295
wined3d: Use the MAX_TEXTURES define in a few more places.
...
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-03-10 23:21:24 +01:00
Matteo Bruni
09483c6801
wined3d: Don't advertise unsupported shader versions.
...
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-03-10 23:21:24 +01:00
Henri Verbeet
11fb78d9bd
wined3d: Don't read modifiers for opcodes with "read_opcode_func" set (AFL).
...
Otherwise "len" would be inconsistent with "p". This assumes opcodes with
"read_opcode_func" either don't have modifiers or handle them themselves.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 11:05:14 +01:00
Henri Verbeet
a9e5a02a20
wined3d: Validate instruction lengths in shader_sm4_read_instruction() (AFL).
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-09 11:05:12 +01:00
Józef Kucia
c7f3308db7
wined3d: Add support for seamless cube map filtering.
...
Seamless cube map filtering should always be enabled in D3D10+.
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-03-08 16:37:35 +01:00
Józef Kucia
9cb650a3b8
wined3d: Avoid FIXME() message for unhandled cube map arrays.
...
There are no GLSL functions with the type part for cube map array
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-03-08 16:37:31 +01:00
Józef Kucia
646cb95942
wined3d: Create dummy cube array 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-03-08 16:37:29 +01:00
Józef Kucia
f8723d096a
wined3d: Add FIXME() messages for unhandled shader bytecode UAV flags.
...
The new definition of WINED3D_SM5_UAV_FLAGS_MASK doesn't overlap with
WINED3D_SM4_RESOURCE_TYPE_MASK.
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-03-08 16:37:27 +01:00
Józef Kucia
c4d4959e1c
wined3d: Fix parsing of SM5 "_opc" 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-03-08 16:37:25 +01:00