Commit Graph

6645 Commits

Author SHA1 Message Date
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
Henri Verbeet e4cb3b5081 wined3d: Recognize the SM4 or opcode. 2015-02-11 23:05:17 +09:00
Henri Verbeet 3225fea30c wined3d: Recognize the SM4 ne opcode. 2015-02-11 23:05:13 +09:00
Henri Verbeet 8506da62e0 wined3d: Implement WINED3DSIH_SQRT in the GLSL shader backend. 2015-02-11 23:05:08 +09:00
Henri Verbeet 1dfea3a4ba wined3d: Do not validate format restrictions for buffers.
Buffers don't have a format as such, and are created with either
WINED3DFMT_UNKNOWN or WINED3DFMT_VERTEXDATA.
2015-02-11 23:05:04 +09:00
Henri Verbeet 5045ca639d wined3d: Add some warnings when resource_init() fails due to format restrictions. 2015-02-11 23:04:59 +09:00
Matteo Bruni ac3df5e1f1 wined3d: Use the proper pitch in read_from_framebuffer().
This function is only used in the non-default "backbuffer" ORM.
2015-02-11 22:21:36 +09:00
Matteo Bruni 20e61b396e wined3d: Use unsigned short for the bitfields in struct color_fixup_desc. 2015-02-11 22:21:28 +09:00
Matteo Bruni b875a4a44a wined3d: Use GL_CLAMP_TO_EDGE instead of GL_CLAMP.
GL_CLAMP was removed from core profile and probably GL_CLAMP_TO_EDGE was
intended to be used here anyway.
2015-02-10 16:21:55 +09:00
Matteo Bruni f4da723151 wined3d: Call glReadBuffer() through the appropriate function pointer. 2015-02-10 16:21:41 +09:00
Matteo Bruni 1612dc4dc9 wined3d: Refuse pixel shaders declaring POSITION0 inputs. 2015-02-09 22:05:43 +09:00
Matteo Bruni 74b4516bfa wined3d: Only consider POSITION0 PS inputs as vpos. 2015-02-09 22:05:41 +09:00
Matteo Bruni 96b48191c0 wined3d: Only copy POSITION0 output semantics into gl_Position. 2015-02-09 22:05:35 +09:00
Matteo Bruni 1aa5015467 wined3d: Directly use the core version of glTex[Sub]Image3D. 2015-02-09 22:05:32 +09:00
Stefan Dösinger da5041eb4b wined3d: Check the d3d buffer to find converted attributes.
This fixes some tests with ARB shaders that were broken since
1360af6adc. When buffer_internal_preload
is called by context_update_stream_info, si->elements[i].data is not yet
set.
2015-02-06 22:20:26 +09:00
Stefan Dösinger e178b7ec9a wined3d: Don't use TXP for rectangle P8 textures.
This was probably taken from the YUV shaders, incorrectly and in reverse
logic. It did happen to work though because fragment.texcoord[0].w is 1.0.
2015-02-04 23:15:03 +09:00
Stefan Dösinger 3d49060fdf wined3d: Fix the color keyed P8 alpha ref value. 2015-02-04 23:14:59 +09:00
Matteo Bruni 9defaa53a1 wined3d: Use the core version of the asynchronous queries functions. 2015-02-02 22:39:05 +09:00
Stefan Dösinger 3ef1d6bcd9 wined3d: Pass WM_SYSCOMMAND(SC_RESTORE) to DefWindowProc. 2015-01-28 11:06:48 +01:00
Andrew Eikum 7b45103c4a wined3d: Fix spec file entry for wined3d_texture_create. 2015-01-23 17:28:40 +01:00
Matteo Bruni d360a51f3c wined3d: Use the core version of the shader object functions. 2015-01-23 12:02:37 +01:00
Matteo Bruni e192939652 wined3d: Use the core version of GL vertex attribute functions where possible. 2015-01-23 12:02:33 +01:00
Matteo Bruni 584892b692 wined3d: Properly initialize the last two components of R16G16_SINT attributes. 2015-01-23 12:02:28 +01:00
Matteo Bruni 270431c220 wined3d: Don't normalize R8G8B8A8_UINT attributes. 2015-01-22 13:37:55 +01:00
Matteo Bruni 8ddb7e32f8 wined3d: Add separate stencil state setup via GL 2.0+ core functions. 2015-01-22 13:37:53 +01:00
Matteo Bruni 915e0ef0cf wined3d: Always use the core version of the glPointParameteri function.
The state function depends on GL 2.0+ so it's unnecessary to
check for NV_POINT_SPRITE.
2015-01-20 16:09:01 +01:00
Matteo Bruni aff0c389cc wined3d: Use the core version of glDrawElementsInstanced. 2015-01-20 16:08:58 +01:00
Matteo Bruni 75b96768e5 wined3d: Use the core version of glDrawBuffers. 2015-01-20 16:08:56 +01:00
Matteo Bruni 6bb32e47ff wined3d: Use the core gl*CompressedTex* functions. 2015-01-20 16:08:54 +01:00
Henri Verbeet 525696fe6c wined3d: Properly cleanup samplers on wined3d_device_reset() / wined3d_device_uninit_3d(). 2015-01-19 14:31:53 +01:00
Henri Verbeet ca06f960ed wined3d: Use the same flags for wined3d_texture_set_color_key() and the "color_key_flags" field it sets.
This fixes a regression introduced by commit a8ab569415.
2015-01-19 14:31:51 +01:00
Henri Verbeet 2912e2938e wined3d: Handle the SM4 SV_POSITION pixel shader input semantic in the GLSL shader backend.
This is (mostly) equivalent to the vPos register in SM3.
2015-01-19 14:31:38 +01:00
Henri Verbeet 2e5abc156a wined3d: Implement WINED3DSIH_SAMPLE in the GLSL shader backend. 2015-01-19 14:31:32 +01:00
Henri Verbeet 60d44af34e wined3d: Merge shader_glsl_load_vsamplers() and shader_glsl_load_psamplers(). 2015-01-15 17:24:45 +01:00
Henri Verbeet c6232e1d11 wined3d: Create GL sampler objects for wined3d sampler objects. 2015-01-15 17:24:43 +01:00