Commit Graph

6679 Commits

Author SHA1 Message Date
Stefan Dösinger 3c2d0b983a wined3d: Avoid constant collision in atifs. 2015-03-24 20:06:18 +09:00
Stefan Dösinger 239e8cad7c wined3d: Add per-context private data for fragment pipelines. 2015-03-24 20:06:15 +09:00
Stefan Dösinger 1b0c063632 wined3d: Check for conversion changes in the atifs fragment pipeline.
Mapping colorop to pixelshader is necessary because misc_state_template
defines a pixel shader handler. We have to use the same representative
in all pipeline parts.

Wined3d_cs_exec_set_texture dirtifies the pixel shader state when the
fixup of a texture changes. Atifs no longer needs a pixel shader handler
on its own since vertex shader updates aren't delayed any more when the
pixel shader state is dirty.
2015-03-24 20:06:05 +09:00
Stefan Dösinger 92fee8c04f wined3d: Improve color fixups in atifs shaders.
The abilities of this hardware is too limited to support generic sign /
swizzle fixups. A generic handler would consume 4 of the 8 available
color instruction slots and 2 alpha instruction slots.

The bump mapping handler code has its own way of handling the color
fixups. It merges the fixup into the perturbation calculation without
requiring extra shader instructions. In theory this is possible for the
majority of d3d texture ops as well, but I don't think this is worth the
effort. I expect that this code will only be used for the ddraw signed
format test in practice.
2015-03-24 20:05:46 +09:00
Henri Verbeet 010ff106dd d3d10core: Implement d3d10_device_DrawInstanced(). 2015-03-24 17:41:17 +09:00
Henri Verbeet a33d3ad41b wined3d: Add support for SV_InstanceID. 2015-03-24 17:41:12 +09:00
Henri Verbeet f9fafb3686 wined3d: Use the "sysval_semantic" field instead of "semantic_name" to recognize SV_POSITION. 2015-03-24 17:41:09 +09:00
Henri Verbeet 1b08196c5a wined3d: Implement d3d10 style instance data step rates. 2015-03-24 17:41:06 +09:00
Matteo Bruni 74cda79ac3 wined3d: Introduce a get_texture_matrix() function. 2015-03-23 22:59:20 +09:00
Matteo Bruni 2d270f31c6 wined3d: Introduce a get_projection_matrix() function.
Notice that I'm using floats instead of doubles in the new function,
mostly to be able to use struct wined3d_matrix and multiply_matrix().
At a rough estimate the precision should still be good enough.
2015-03-23 22:59:19 +09:00
Matteo Bruni 65c8c40b18 wined3d: Use a separate STATE_VIEWPORT state handler in the GLSL pipeline. 2015-03-23 22:59:18 +09:00
Henri Verbeet 88f230b56e d3d10core: Also pass unused input layout elements to wined3d.
While these won't be used by the shader, they potentially affect the
calculated offset for WINED3D_APPEND_ALIGNED_ELEMENT elements.
2015-03-23 22:59:12 +09:00
Henri Verbeet cbe717b8f3 wined3d: Take the input slot into account when handling WINED3D_APPEND_ALIGNED_ELEMENT. 2015-03-23 22:59:11 +09:00
Henri Verbeet f3765e9f77 wined3d: Merge some common shader initialization code into shader_init(). 2015-03-23 22:59:10 +09:00
Henri Verbeet 002713de6d wined3d: Store shader input signatures as a wined3d_shader_signature structure. 2015-03-23 22:59:08 +09:00
Henri Verbeet 2e5ad1b6e3 wined3d: Store shader output signatures as a wined3d_shader_signature structure.
Instead of a fixed array of wined3d_shader_signature_element structures.
Shader model 4 shaders can have different semantics in a single
register, e.g.  v1.xy TEXCOORD0 and v1.zw TEXCOORD1, so having a single
wined3d_shader_signature_element structure per register isn't
necessarily sufficient.
2015-03-23 22:59:07 +09:00
Henri Verbeet ec78d50193 wined3d: Fix a TRACE in wined3d_device_draw_indexed_primitive_instanced(). 2015-03-20 21:32:50 +09:00
Henri Verbeet ba396e4212 wined3d: Simplify the wined3d_matrix structure. 2015-03-20 21:32:46 +09:00
Francois Gouget f505e6fb4a Assorted spelling fixes. 2015-03-19 21:54:14 +09:00
Matteo Bruni 9811d85141 wined3d: Don't use the builtin FFP uniform for the modelview matrix. 2015-03-19 20:56:59 +09:00
Matteo Bruni 425dc69fef wined3d: Use a separate STATE_TRANSFORM(WINED3D_TS_VIEW) state handler in the GLSL pipeline. 2015-03-19 20:56:56 +09:00
Matteo Bruni 99f3e835ac wined3d: Use a separate STATE_VDECL state handler in the GLSL pipeline.
It's mostly a copy of vertexdeclaration() from state.c, with a few
differences due to the new function being private to the GLSL backend
(e.g. d3d_info.vs_clipping is known to be TRUE) and the fragment fog
update part being split out.
2015-03-19 20:56:50 +09:00
Matteo Bruni 50861156e2 wined3d: Introduce a get_modelview_matrix() function. 2015-03-19 20:56:45 +09:00
Matteo Bruni fe4a226bfa wined3d: Introduce a get_identity_matrix() function. 2015-03-19 20:56:42 +09:00
Stefan Dösinger df829de88d ddraw: Handle DDBLT_ROP in ddraw. 2015-03-18 21:03:22 +09:00
Matteo Bruni 38e4cb29e7 wined3d: Depend on the vertex shader state instead of the vertex declaration state where appropriate. 2015-03-18 21:02:55 +09:00
Matteo Bruni d8c5e417c2 wined3d: Force stream info update on vertex shader change. 2015-03-18 21:02:41 +09:00
Stefan Dösinger 406cfefc2f wined3d: Initialize WINED3DTA_TEMP. 2015-03-11 22:09:42 +09:00
Matteo Bruni f298d30b39 wined3d: Fix a typo in a trace in context_create(). 2015-03-11 22:08:34 +09:00
Stefan Dösinger d4db09d0e9 wined3d: Support WINED3DFMT_R5G5_SNORM_L6_UNORM with EXT_texture_snorm.
From: Stefan Dösinger <stefandoesinger@gmx.at>
2015-03-10 21:43:34 +09:00
Stefan Dösinger 6df52ca7e6 wined3d: Add support for GL_EXT_texture_snorm. 2015-03-10 21:43:32 +09:00
Stefan Dösinger 6f2f73a456 wined3d: Improve the unsigned emulation of WINED3DFMT_R5G5_SNORM_L6_UNORM. 2015-03-10 21:43:11 +09:00
Stefan Dösinger ce836bf651 wined3d: Properly up-scale WINED3DFMT_R5G5_SNORM_L6_UNORM. 2015-03-10 21:43:07 +09:00
Bernhard Übelacker 44ddcac6c3 wined3d: Recognize Nvidia GeForce 8100 with Nouveau driver (bug). 2015-03-10 21:42:50 +09:00
Matteo Bruni db80aba5ad wined3d: Drop redundant check for instanced rendering from drawStridedFast.
We need GL_ARB_instanced_arrays to be able to take the fastest path and
that's already checked in draw_primitive.  Note that
GL_ARB_instanced_arrays provides glDrawElementsInstanced if
GL_ARB_draw_instanced is not supported so we don't need to explicitly
check for the latter.
2015-03-02 13:48:00 +09:00
Matteo Bruni 8ed9c2a11b wined3d: Add a couple checkGLcall() in surface_prepare_rb(). 2015-03-02 13:47:56 +09:00
Matteo Bruni 2f804307bd wined3d: Drop a few unnecessary &x[0]. 2015-03-02 13:47:52 +09:00
Matteo Bruni 7f618695c6 wined3d: Remove an obsolete comment.
Wined3d doesn't actually require the GLX extension for multisampling
at this point (while it does require FBOs).
2015-03-02 13:47:46 +09:00
Matteo Bruni 67d2b52c27 wined3d: Remove ARB_/EXT_TEXTURE_ENV_ADD. 2015-02-26 20:08:57 +09:00
Matteo Bruni aca8ab91eb wined3d: Use the core version of the INCR_WRAP and DECR_WRAP tokens. 2015-02-25 20:35:28 +09:00
Matteo Bruni 78ae4f66d7 wined3d: Set GL_UNPACK_ALIGNMENT to 1.
Alignment should be taken care by the surface pitch and
GL_UNPACK_ROW_LENGTH alone just fine, as long as the pitch is a
multiple of the pixel size. Client APIs respect that,
internally we need to do the same and the changes to
surface_load_texture and wined3d_volume_upload_data are there
for this reason (e.g. WINED3DFMT_R16G16_SNORM is emulated with
GL_RGB16 when NV_texture_shader isn't supported).
2015-02-20 22:53:09 +09:00
Matteo Bruni 7c4d512fee wined3d: Make sure the correct texture is bound in device_update_volume. 2015-02-19 17:52:03 +09:00
Matteo Bruni b47695bf3a wined3d: Reject unsupported pitches in wined3d_surface_update_desc(). 2015-02-19 17:51:47 +09:00
Matteo Bruni d56c168da1 wined3d: Set the surface pitch for user-memory surfaces. 2015-02-19 17:51:36 +09:00
Henri Verbeet 3fa8f4ece3 wined3d: Apply modifiers after floatBitsToInt()/floatBitsToUint() in shader_glsl_add_src_param(). 2015-02-18 23:21:49 +09:00
Stefan Dösinger 52ab9e382e wined3d: Read WINED3D_TEXTURE_COLOR_KEY and gl_color_key to find format conversions.
The idea is to make it clear that wined3d_texture_load is responsible
for checking the color key for changes. Once we can do color keying in
the shader we also have one place where we can disable the surface
conversion.
2015-02-18 22:02:39 +09:00
Stefan Dösinger e53d22b0c0 wined3d: Manage color key changes in the texture.
This fixes a regression with color keyed mipmaps that was introduced by
ee8a5b7dd1. surface_load for level n+1
would call texture_force_reload, thus removing level n from the GL
texture.
2015-02-18 22:02:33 +09:00
Henri Verbeet 849149d5d3 wined3d: Add support for appending vertex declaration elements. 2015-02-13 18:53:17 +09:00
Stefan Dösinger 9b3ab8a6f4 wined3d: Set z = 0.0 via the projection matrix instead of depth clamping.
This works on cards that don't implement ARB_depth_clamp like r500
cards. Note that texturing is influenced by position.w, not position.z.
2015-02-12 22:20:05 +09:00
Henri Verbeet 471e626052 wined3d: Fix the .spec. 2015-02-12 22:12:11 +09:00