Commit Graph

6752 Commits

Author SHA1 Message Date
Matteo Bruni ca46914d07 wined3d: Use string_buffer_sprintf() in shader_glsl_generate_ffp_fragment_shader(). 2015-04-29 17:02:30 +09:00
Matteo Bruni 12e59c5278 wined3d: Use string_buffer_sprintf() in handle_ps3_input(). 2015-04-29 17:02:27 +09:00
Henri Verbeet da24b51139 wined3d: Don't try to apply format fixups for SM4+ shaders. 2015-04-29 12:24:36 +09:00
Matteo Bruni 28343db208 wined3d: Don't use the builtin FFP uniforms for the lights.
While at it, use D3D-like uniforms for the light parameters and
(consequently) implement range and proper D3D spotlights support.
2015-04-28 20:02:23 +09:00
Matteo Bruni e226e7593a wined3d: Use struct wined3d_vec4 to store the light position and direction. 2015-04-28 20:02:21 +09:00
Matteo Bruni 540130bfa9 wined3d: Store the directional light direction in the lightDirn field.
It's only an implementation detail that the direction needs to be passed
to the fixed function GL pipeline as GL_POSITION.
2015-04-28 20:02:18 +09:00
Matteo Bruni b5affa6d3c wined3d: Set spotlight direction .w component to 0.0f.
It's a direction so we don't want to get translations applied to it.
The variable is only used internally.
2015-04-28 20:02:12 +09:00
Henri Verbeet f09288cfc4 wined3d: Cleanup the sampler map in shader_cleanup() (Valgrind). 2015-04-28 15:34:12 +09:00
Henri Verbeet 4b86f13ade wined3d: Also free the input signature in shader_cleanup() (Valgrind). 2015-04-27 18:05:24 +09:00
Henri Verbeet 79f4ca9ec4 wined3d: Release the context before potentially destroying the swapchain in wined3d_device_uninit_3d() (Valgrind). 2015-04-27 18:05:22 +09:00
Stefan Dösinger 0152b0dad3 wined3d: Move the ARB_texture_rectangle check to init_format_texture_info. 2015-04-27 15:07:48 +09:00
Stefan Dösinger 0d6d64b358 wined3d: Move the ARB_texture_cube_map check to init_format_texture_info. 2015-04-27 15:07:46 +09:00
Stefan Dösinger 7109bebd02 wined3d: Move volume DXTn handling to apply_format_fixups. 2015-04-27 15:07:42 +09:00
Matteo Bruni 978fe23218 wined3d: Don't use the builtin FFP uniforms for the material. 2015-04-27 15:07:11 +09:00
Matteo Bruni 6984ca7f46 wined3d: Don't use the builtin FFP uniforms for texture transformation matrices. 2015-04-27 15:07:06 +09:00
Matteo Bruni 84ca0203bf wined3d: Introduce a scratch string buffers framework. 2015-04-27 15:07:03 +09:00
Matteo Bruni 54b4df6731 wined3d: Reduce initial wined3d_string_buffer buffer size to 32.
Also try to avoid unnecessary HeapReAlloc() + vsnprintf() loops when we
know the required size of the buffer.
2015-04-27 15:06:58 +09:00
Matteo Bruni 64463b81df wined3d: Rename struct wined3d_shader_buffer to wined3d_string_buffer.
Also rename the shader_buffer_(clear|init|free) functions.
2015-04-27 15:06:55 +09:00
Stefan Dösinger 072e1a3fb2 wined3d: Move the EXT_texture3D check to init_format_texture_info. 2015-04-24 19:08:45 +09:00
Stefan Dösinger 9def5ff409 wined3d: Query info for each resource type from ARB_internalformat_query2. 2015-04-24 19:08:41 +09:00
Stefan Dösinger e4e1e7d8d3 wined3d: Read flags of the right resource type in check_device_format. 2015-04-24 19:08:39 +09:00
Stefan Dösinger 3c0ed9ce0a wined3d: Introduce resource-type specific format flags. 2015-04-24 19:08:35 +09:00
Matteo Bruni 53ff2a9d22 wined3d: Drop the ARB_SHADER_OBJECTS extension flag.
The flag is currently unused and also unnecessary since both
ARB_vertex_shader and ARB_fragment_shader specs require
ARB_shader_objects support.
2015-04-24 19:08:15 +09:00
Matteo Bruni 7928ffaca5 wined3d: Drop glPrioritizeTextures() call.
It's not supported on core profiles and I doubt it matters anyway.
For the records, the default value is 1 so this was actually lowering
the priority for DEFAULT pool textures.
2015-04-24 19:08:10 +09:00
Matteo Bruni d6db6c7295 wined3d: Fix specular lighting for non-local viewer.
The viewer is in the (0.0, 0.0, -1.0) direction in the D3D coordinate
system.
2015-04-24 19:08:01 +09:00
Matteo Bruni b963c73abb wined3d: Introduce D3D7+ normal matrix computation. 2015-04-24 19:07:52 +09:00
Henri Verbeet cfd280fd66 wined3d: Get rid of the tracing code in shader_vaddline(). 2015-04-24 14:29:39 +09:00
Henri Verbeet dd2398297c wined3d: Simplify shader_arb_dump_program_source(). 2015-04-24 14:29:32 +09:00
Stefan Dösinger 4fbaab2020 wined3d: Shadow format flags in wined3d_rendertarget_view. 2015-04-23 20:43:20 +09:00
Francois Gouget 6f6dfe91d6 wined3d: Make glsl_vertex_pipe_view() static. 2015-04-23 20:43:19 +09:00
Stefan Dösinger 9076612e2d wined3d: Shadow format flags in the resource. 2015-04-22 23:24:41 +09:00
Henri Verbeet 6e4ad78ff4 wined3d: Slightly simplify get_info_log_line(). 2015-04-21 23:44:59 +09:00
Henri Verbeet de1450788b wined3d: Completely initialize "correction_params" in shader_glsl_load_constants() (Valgrind).
Leaving the last two elements uninitialized is mostly harmless since the
shader doesn't actually use them, but the driver might try to do some kind of
analysis on them.
2015-04-21 22:22:00 +09:00
Henri Verbeet c7780791ea wined3d: Introduce a function to compile ARB vertex/fragment programs. 2015-04-21 22:21:56 +09:00
Henri Verbeet 8063d4cfcc wined3d: Initialize "type.padding" in arbfp_blit_set() (Valgrind). 2015-04-21 22:21:52 +09:00
Henri Verbeet 8b6cddbe25 wined3d: Get rid of context_invalidate_active_texture().
Calling wined3d_texture_bind() + context_invalidate_active_texture() is
equivalent to just calling wined3d_texture_bind_and_dirtify().
2015-04-16 20:44:43 +09:00
Henri Verbeet dcaaf915f8 wined3d: Use wined3d_texture_bind_and_dirtify() in wined3d_texture_upload_data(). 2015-04-16 20:44:41 +09:00
Henri Verbeet 5c9da580a8 wined3d: Use wined3d_texture_bind_and_dirtify() in device_update_volume().
I missed this in 7c4d512fee. Generally speaking,
the only places where plain wined3d_texture_bind() calls are appropriate are
places where you're binding the texture to a specific stage for a subsequent
draw. I.e., places where context_active_texture() is called first.
2015-04-16 20:44:37 +09:00
Henri Verbeet 52478e3809 wined3d: Bind the texture before calling wined3d_volume_upload_data() in wined3d_volume_load_location(). 2015-04-16 20:44:31 +09:00
Henri Verbeet aad0ab8101 wined3d: Properly handle WINED3DSIH_DP2 in the GLSL shader backend. 2015-04-15 22:21:59 +09:00
Henri Verbeet a37099e132 wined3d: Bind sampler objects to the correct texture stage.
On current hardware this generally only makes a difference for vertex
textures. This fixes a regression introduced by commit
c6232e1d11.
2015-04-15 22:21:58 +09:00
Henri Verbeet dc53f6c2e6 wined3d: Use the display format if WINED3DFMT_UNKNOWN is passed as backbuffer format for windowed mode resets. 2015-04-15 22:21:58 +09:00
Stefan Dösinger 27209c69a9 wined3d: Call arbfp_blit_surface and ffp_blit_blit_surface through the blit interfaces. 2015-04-15 22:21:58 +09:00
Stefan Dösinger 6b455e74a0 wined3d: Move fixed function draw blits out of surface_blt_special. 2015-04-15 22:21:58 +09:00
Stefan Dösinger f84d741cb3 wined3d: Implement color keying in the ARB fixed function pipeline. 2015-04-15 22:21:58 +09:00
Stefan Dösinger 483d9550c4 wined3d: Use finer grained colorkey state invalidation. 2015-04-15 22:21:58 +09:00
Stefan Dösinger 382fa588a9 wined3d: Handle color key dirtification in wined3d_cs_exec_set_texture. 2015-04-15 22:21:57 +09:00
Joachim Priesner 8fff427bc0 wined3d: Load ModelView matrix for glLightfv calls.
Analogous to the light() function in state.c, the correct ModelView
matrix has to be loaded when glLightfv is called.
2015-04-13 16:41:48 +09:00
Stefan Dösinger c5c7137212 wined3d: Simplify alpha test and color keying in GLSL. 2015-04-10 21:44:13 +09:00
Stefan Dösinger 5c7707dc77 wined3d: Move alpha test states to the fragment pipeline.
This will allow some color keying cleanups. For Core Contexts we'll have
to emulate alpha testing in shaders anyway.
2015-04-10 21:44:01 +09:00