Henri Verbeet
570f865bad
wined3d: Don't use framebuffer blit for backbuffer formats with fixups in swapchain_blit().
2010-03-17 10:06:06 +01:00
Henri Verbeet
60e98cc3ad
wined3d: Don't use filtering on textures that need complex fixups in swapchain_blit().
...
For example, interpolating palette indices doesn't have the desired result.
Should we really want filtering for these cases we could implement it inside
the relevant shaders, after the fixup, but I doubt it's worth the effort.
2010-03-17 10:06:03 +01:00
Henri Verbeet
c48adfe201
wined3d: Use "gl_filter" in the non-FBO path of swapchain_blit() as well.
2010-03-17 10:05:59 +01:00
Stefan Dösinger
cc6d17ba7c
wined3d: Check the alignment of mapped buffer pointers.
...
Windows returns 32 byte aligned pointers when locking vertex and index
buffers, and some applications(Half Life 2, Alpha Prime, possibly others)
rely on this. Check the alignment and fall back to double buffered
buffers with HeapAlloced and aligned pointers if the alignment doesn't
fit.
2010-03-16 17:03:13 +01:00
Stefan Dösinger
6c53871d30
wined3d: Implement unfenced updates of double buffered buffers.
2010-03-16 17:02:50 +01:00
Stefan Dösinger
1691a6d7d0
wined3d: Use glMapBuffer for 1:1 uploads in PreLoad.
...
This is needed to take advantage of asynchronous uploads with double buffered buffers
2010-03-16 17:02:43 +01:00
Stefan Dösinger
04752991b1
wined3d: Don't DISCARD or NOOVERWRITE non-dynamic buffers.
...
Shaiya locks a non-dynamic buffer with the DISCARD flag and expects
the contents to be retained. The SDK says DISCARD requires dynamic
resources, and Windows 7 returns an error in this situation, crashing
Shaiya. This patch sticks to the Windows XP behavior and allows the
lock, but ignores the DISCARD flag to retain the buffer contents.
2010-03-16 17:02:34 +01:00
Alexandre Julliard
bef5645eb1
makefiles: Remove the no longer needed explicit separators for dependencies.
2010-03-16 13:28:19 +01:00
Ričardas Barkauskas
a7aa4a87e2
wined3d: Fix ATI2N pitch and offset calculations.
2010-03-16 13:03:30 +01:00
Henri Verbeet
78166b0b23
wined3d: Implement SetDestWindowOverride() by simply making the context current on a different window.
2010-03-16 11:45:15 +01:00
Henri Verbeet
cd9a8b74b9
wined3d: Store the device window in the swapchain.
...
The swapchain's current window might be changed by SetDestWindowOverride().
2010-03-16 11:45:11 +01:00
Henri Verbeet
aa819fe888
wined3d: Simplify a comparison in IWineD3DDeviceImpl_Reset().
2010-03-16 11:45:06 +01:00
Henri Verbeet
d6bbe90b85
wined3d: The swapchain should always have a window handle.
2010-03-16 11:45:01 +01:00
Henri Verbeet
0ae49c35fb
wined3d: Use the context's window handle in IWineD3DSurfaceImpl_BltOverride().
2010-03-16 11:44:55 +01:00
Henri Verbeet
7b0b16fafe
wined3d: Use the context's window handle in stretch_rect_fbo().
2010-03-16 11:44:50 +01:00
Henri Verbeet
18ec2525a4
wined3d: Store the swapchain instead of the surface in the context.
2010-03-16 11:44:44 +01:00
Henri Verbeet
b281f23efe
wined3d: Add a separate function to set the pixel format in context_create().
2010-03-16 11:44:38 +01:00
Henri Verbeet
4133a0a4ff
wined3d: Use "gl_info" in some more places in context_create().
2010-03-16 11:44:32 +01:00
Henri Verbeet
4b671f4d54
wined3d: Move device context array functions to device.c.
2010-03-15 15:55:57 +01:00
Henri Verbeet
6ed7906852
wined3d: Don't partially initialize contexts in AddContextToArray().
...
Just add a context to the device's context array.
2010-03-15 15:55:51 +01:00
Henri Verbeet
8a107bc63a
wined3d: Kill pbuffer offscreen rendering support.
...
Our pbuffer support is broken, nobody cares.
2010-03-15 15:55:38 +01:00
Roderick Colenbrander
604caf0caa
wined3d: Remove oversize texture support.
2010-03-15 14:23:15 +01:00
Roderick Colenbrander
74bf524a99
wined3d: Use surface_get_blt_info to compute texture coordinates for surface_blt_to_drawable.
2010-03-15 14:22:57 +01:00
Roderick Colenbrander
360384277b
wined3d: Extend surface_get_depth_blt_info with texture coordinate code from surface_blt_to_drawable.
2010-03-15 14:22:44 +01:00
Paul Andrew Panon
482fbe91e2
wined3d: Update to add Mesa ATI card detection code.
2010-03-05 12:46:46 +01:00
Kusanagi Kouichi
f4bce098ea
wined3d: Fix a failure of card vendor detection.
2010-03-05 12:39:30 +01:00
Stefan Dösinger
bd0641d37f
wined3d: Add wined3d_event_query_create and destroy.
...
This also moves the event query faking code back to the external
interface and removes the temporary WINED3D_EVENT_QUERY_UNSUPPORTED
return value since wined3d_event_query_create properly fails if no
event query GL extension is supported.
2010-03-05 12:39:23 +01:00
Stefan Dösinger
6863af3ebb
wined3d: Introduce wined3d_event_query_issue.
2010-03-05 12:39:15 +01:00
Stefan Dösinger
a0d1a55650
wined3d: Create a wined3d internal event query interface.
...
The newly created wined3d_event_query_test will be available for
wined3d-internal use, primarily for synchronizing buffer updates when
using GL_APPLE_flush_buffer_range.
The wined3d_event_query interface will contain most of the functionality:
* Selecting the proper GL extension
* Context handling
* Thread handling
The IWineD3DEventQuery COM interface will use the internal interface
and implement event query faking on top of it (to enable games that
require event queries able to run on drivers that don't implement the
GL extension).
2010-03-05 12:39:07 +01:00
Henri Verbeet
ba519be60f
wined3d: Split TEXT shader comments into separate lines.
...
Based on a patch by Christian Costa.
2010-03-04 17:29:16 +01:00
Paul Andrew Panon
74a059d21b
wined3d: Add Mesa ATI card detection code.
2010-03-03 16:13:23 +01:00
Paul Andrew Panon
85b07b9d38
wined3d: Add a card detection table and refactor wined3d_guess_card.
2010-03-03 16:13:09 +01:00
Paul Andrew Panon
1735b4ee92
wined3d: Adjust the quirks to use the new GL_VENDOR codes.
2010-03-03 16:06:40 +01:00
Paul Andrew Panon
7a9734dc68
wined3d: Add a real GL vendor detection.
2010-03-03 16:06:28 +01:00
Paul Andrew Panon
31573b21b9
wined3d: Rename GL_VENDOR to HW_VENDOR.
2010-03-03 16:06:07 +01:00
Roderick Colenbrander
c0ef7a1a93
wined3d: Move the 8-bit palette shader code over to the blit_shader backend.
2010-03-03 12:53:51 +01:00
Roderick Colenbrander
922ad80f42
wined3d: Rename yuv to complex in order to prepare for 8-bit palette fixups using the same code.
2010-03-03 12:53:41 +01:00
Roderick Colenbrander
ccea415c77
wined3d: Fix multisampling on cards without 32-bit RGB fbconfigs.
2010-03-02 11:11:49 +01:00
Henri Verbeet
de006dbcf9
wined3d: Escape shader comments.
2010-02-23 12:06:58 +01:00
Henri Verbeet
eefb45f333
wined3d: Properly report shader comment sizes.
2010-02-23 12:06:54 +01:00
Stefan Dösinger
5c4d3fb5a2
wined3d: Control SFLAG_CONVERTED in surface_prepare_texture.
...
This makes sure that the flag is set correctly when
surface_allocate_surface is called and client storage is disabled
properly for converted surfaces.
2010-02-17 16:50:38 +01:00
Henri Verbeet
f97565191c
wined3d: Drop buffer objects from the stream info as well when PreLoad drops them.
2010-02-16 10:47:56 +01:00
Henri Verbeet
974f888dfa
wined3d: Move the gl info structure to wined3d_private.h.
2010-02-16 10:47:50 +01:00
Henri Verbeet
1a880cb1f9
wined3d: Remove some unused extensions.
2010-02-16 10:47:40 +01:00
Stefan Dösinger
24e2308670
wined3d: Don't use GL_MAP_FLUSH_EXPLICIT_BIT without GL_MAP_WRITE_BIT.
2010-02-09 11:33:44 +01:00
Stefan Dösinger
8625f0cdbf
wined3d: Don't record dirty areas in a readonly lock.
2010-02-09 11:33:34 +01:00
Henri Verbeet
ba8e6f713b
wined3d: Use the HDC from the acquired context to call SwapBuffer().
...
These should be the same, but this way the relation is clearer.
2010-02-05 10:06:21 +01:00
Henri Verbeet
d0afc7567b
wined3d: Call SetDestWindowOverride() before acquiring a context.
2010-02-05 10:06:17 +01:00
Henri Verbeet
3df59ef0d5
wined3d: Get rid of the now redundant max_ffp_texture_stages device field.
2010-02-05 10:06:12 +01:00
Henri Verbeet
4c7bcb883b
wined3d: Set the texture stage limit based on the fragment pipe caps.
2010-02-05 10:06:08 +01:00
Henri Verbeet
b59dd0e4e8
wined3d: Add the general combiner limit to wined3d_gl_info.
2010-02-05 10:06:03 +01:00
Henri Verbeet
576ea95803
wined3d: Remove the unused device type parameter from the shader backend's get_caps() function.
2010-02-04 13:39:27 +01:00
Henri Verbeet
497386dc5c
wined3d: Remove the unused device type parameter from the fragment pipe's get_caps() function.
...
On the subject of actually supporting software devices, we should probably
implement those by creating a software or reference adapter with appropriate
gl_info and pipe implementations and creating a device based on that.
2010-02-04 13:39:26 +01:00
Henri Verbeet
af7dfcd378
wined3d: Do not preload surfaces when attaching them to an FBO.
...
Just make sure the texture is allocated, so we have something to attach. Note
also that context_apply_attachment_filter_states() runs under the GL lock, so
preloading resources is actually unsafe there.
2010-02-04 13:39:26 +01:00
Henri Verbeet
02e0b3ae1a
wined3d: Introduce surface_prepare_texture().
...
Similar to surface_prepare_system_memory(). In the long term we'll probably
want to move the whole location management to resource.c and unify buffers and
textures there.
2010-02-04 13:39:26 +01:00
Henri Verbeet
b0583a2410
wined3d: Never acquire a context in IWineD3DSurfaceImpl_BindTexture().
...
The caller is already responsible for doing this, so it's redundant at best.
2010-02-04 13:39:26 +01:00
Henri Verbeet
84913109f6
wined3d: Explicitly load and modify the surface in color_fill_fbo().
2010-02-03 13:54:02 +01:00
Henri Verbeet
5f3dccddb4
wined3d: Do not depend on context_attach_surface_fbo() to load the surface in stretch_rect_fbo().
2010-02-03 13:54:02 +01:00
Henri Verbeet
040452ad90
wined3d: Update the stream info before applying states.
2010-02-03 13:54:02 +01:00
Henri Verbeet
31d51fb175
wined3d: Preload textures before applying states.
2010-02-03 13:54:02 +01:00
Henri Verbeet
7ff576bbab
wined3d: Select the blitter during adapter initialization.
2010-02-03 13:54:02 +01:00
Henri Verbeet
cee8e9d881
wined3d: Select the shader backend during adapter initialization.
2010-02-02 14:11:02 +01:00
Henri Verbeet
fb21551b2d
wined3d: Select the fragment pipeline during adapter initialization.
2010-02-02 14:10:56 +01:00
Henri Verbeet
93c49f1777
wined3d: Update the swapchain's present parameters when changing the backbuffer.
...
This fixes a bug exposed by commit b5907e23cc
.
2010-02-02 14:10:52 +01:00
Henri Verbeet
97700f05a9
wined3d: TRACE IWineD3DDeviceImpl_CreateSurface() parameters.
2010-02-02 14:10:44 +01:00
Henri Verbeet
42c83f0260
wined3d: Dump ARB program shaders on compile failure.
...
Similar to the patch for GLSL.
2010-02-02 14:10:40 +01:00
Stefan Dösinger
224043d6cf
wined3d: Implement dynamic buffers with GL_ARB_map_buffer_range.
2010-02-02 14:09:14 +01:00
Stefan Dösinger
f6bb86e196
wined3d: Add GL_ARB_map_buffer_range.
2010-02-02 14:09:04 +01:00
Henri Verbeet
c43c2a2845
wined3d: Use the absolute source value in shader_glsl_rsq().
2010-02-01 14:16:26 +01:00
Henri Verbeet
adf4ca2e23
wined3d: Handle a zero source value for WINED3DSIH_RSQ.
2010-02-01 14:16:22 +01:00
Henri Verbeet
ef82681d59
wined3d: Handle a zero source value for WINED3DSIH_RCP.
2010-02-01 14:16:18 +01:00
Henri Verbeet
4a8f93bade
wined3d: Handle a zero source value for WINED3DSIH_LOG.
2010-02-01 14:16:15 +01:00
Henri Verbeet
bef792f5ff
wined3d: Handle zero-length vectors for WINED3DSIH_NRM.
...
Unfortunately there's no reliable way to generate infinity in GLSL, but a
sufficiently large value will probably do. The important part of the patch is
that we don't generate NaN, because that will keep propagating through the
entire shader.
2010-02-01 14:16:11 +01:00
Luca Bennati
9f3c90973f
wined3d: Add newer ATI/AMD cards vendor recognition.
2010-02-01 12:46:23 +01:00
Stefan Dösinger
d499073c10
wined3d: Catch invalid buffer map parameters.
2010-01-29 14:59:02 +01:00
Henri Verbeet
9f21f2c2f2
wined3d: Dump the GLSL shader source on link failure.
...
Mostly to help Mesa developers diagnose bug reports involving GLSL compile
failures, but it's convenient in general to have the source all in one place.
2010-01-29 13:30:06 +01:00
Henri Verbeet
c03d367d3c
wined3d: Get rid of an unnecessary GetContainer() call in surface_blt_to_drawable().
2010-01-29 13:30:06 +01:00
Henri Verbeet
d66f5345e6
wined3d: Prune invalid states from the state table.
2010-01-29 13:30:06 +01:00
Henri Verbeet
19516bf69f
wined3d: Add some basic state table validation.
2010-01-29 13:30:05 +01:00
Henri Verbeet
9bbccb7f80
wined3d: Add a debug function for state names.
2010-01-29 13:30:05 +01:00
Henri Verbeet
a3e1a6f2ee
wined3d: Use correct texture stage limits in a couple of places.
2010-01-28 11:08:14 +01:00
Henri Verbeet
daf0aeb34a
wined3d: Make sure all contexts are finished drawing before calling SwapBuffers().
...
This causes a small performance hit when multiple GL contexts are used. As an
optimization we could use ARB_sync to only wait for the last draw call instead
of all GL commands.
2010-01-28 11:08:07 +01:00
Henri Verbeet
ce42470138
wined3d: Ensure draw ordering across contexts.
2010-01-28 11:07:59 +01:00
Henri Verbeet
b2e511f391
wined3d: Trace the GLSL version string.
...
At some point we'll use the GLSL version to check if certain features are
available. For now just print the version.
2010-01-28 11:07:52 +01:00
Henri Verbeet
08c2a23599
wined3d: Just use the GL 1.1 texture format constants.
...
We assume GL 1.1 is available everywhere else.
2010-01-28 11:07:48 +01:00
Henri Verbeet
69861cf873
wined3d: Get rid of the depth range hack.
2010-01-27 11:16:07 +01:00
Henri Verbeet
fe1024ae4f
wined3d: Add a FIXME for missing ARB_depth_clamp support.
2010-01-27 11:15:45 +01:00
Stefan Dösinger
ee720f05d1
wined3d: Put the APPLE_flush_buffer_range code into the right branch.
2010-01-26 12:18:59 +01:00
Henri Verbeet
005eb0bd7d
wined3d: Move some macros to directx.c.
...
Nothing GL specific about these.
2010-01-26 12:08:33 +01:00
Henri Verbeet
98568f0ba1
wined3d: Add support for ARB_vertex_array_bgra.
2010-01-26 12:08:27 +01:00
Henri Verbeet
96b150929b
wined3d: Add an ARB_sync implementation of event queries.
2010-01-26 12:08:23 +01:00
Henri Verbeet
c698171fa3
wined3d: Add support for ARB_sync.
2010-01-26 12:08:18 +01:00
Henri Verbeet
705f96fa39
wined3d: Get rid of some unnecessary casts to specific shader types.
2010-01-26 12:08:13 +01:00
Henri Verbeet
3d112b6525
wined3d: Add support for EXT_gpu_shader4 provided sampling functions with explicit derivatives.
2010-01-25 12:58:59 +01:00
Henri Verbeet
f71e84d89c
wined3d: Store a pointer to the GL info in the shader context.
2010-01-25 12:58:52 +01:00
Henri Verbeet
c78cce8845
wined3d: Use the correct GLSL functions for sampling Rect textures with explicit derivatives.
...
Also kill the obsolete comment.
2010-01-25 12:58:48 +01:00
Henri Verbeet
5f4ff65fb4
wined3d: Use the GLSL round() function when available.
2010-01-25 12:58:43 +01:00
Henri Verbeet
869fc74576
wined3d: Add support for EXT_gpu_shader4.
2010-01-25 12:58:39 +01:00
Henri Verbeet
60ad1aed63
wined3d: Remove unused occlusion query extensions.
2010-01-22 12:12:14 +01:00
Henri Verbeet
c5086a123e
wined3d: Remove the duplicate GL_2X_BIT_ATI define.
2010-01-22 12:12:07 +01:00
Henri Verbeet
7047f09890
wined3d: Remove the second set of EXT_texture_env_dot3 definitions.
2010-01-22 12:12:01 +01:00
Henri Verbeet
53c3521795
wined3d: Fix the ARB_pixel_buffer_object extension definitions.
2010-01-22 12:11:56 +01:00
Henri Verbeet
2fe633efbc
wined3d: Sort our GL extension definitions.
...
This makes some of the problems in there a bit more obvious.
2010-01-22 12:11:51 +01:00
Henri Verbeet
d967973d8c
wined3d: Set the query.c GLINFO_LOCATION to *gl_info.
2010-01-20 15:30:04 +01:00
Henri Verbeet
ee1f2c4654
wined3d: Don't leak the context array in the swapchain_init() error path.
2010-01-20 15:29:57 +01:00
Henri Verbeet
516d54bf91
wined3d: Merge baseshader.c into shader.c.
2010-01-18 14:37:51 +01:00
Henri Verbeet
36b21e332c
wined3d: Remove some unused query code.
2010-01-18 14:37:37 +01:00
Henri Verbeet
a2624ae82e
wined3d: Add a separate function for query initialization.
2010-01-18 14:37:30 +01:00
Paul Vriens
c8681f885d
wined3d: Fix use of memset (Coccinelle).
2010-01-08 10:13:51 +01:00
Henri Verbeet
46cefd312c
wined3d: Recognize the SM4 cut opcode.
2010-01-07 09:26:54 +01:00
Henri Verbeet
449e521984
wined3d: Recognize the SM4 endloop opcode.
2010-01-07 09:26:49 +01:00
Henri Verbeet
0296aaa6a6
wined3d: Recognize the SM4 endif opcode.
2010-01-07 09:26:45 +01:00
Henri Verbeet
58233befb7
wined3d: Recognize the SM4 break opcode.
2010-01-07 09:26:40 +01:00
Henri Verbeet
dbeeb07713
wined3d: Recognize the SM4 if opcode.
2010-01-07 09:26:36 +01:00
Henri Verbeet
3687677427
wined3d: Recognize the SM4 lt opcode.
2010-01-07 09:26:30 +01:00
Henri Verbeet
6d5aca61f3
wined3d: Recognize the SM4 iadd opcode.
2010-01-07 09:26:25 +01:00
Henri Verbeet
22939f9d29
wined3d: Recognize the SM4 emit opcode.
2010-01-07 09:26:20 +01:00
Henri Verbeet
6715d495ea
wined3d: Recognize the SM4 breakc opcode.
...
Map this to WINED3DSIH_BREAKP because it's a better fit.
2010-01-07 09:26:14 +01:00
Henri Verbeet
c57c76b78e
wined3d: Recognize the SM4 ige opcode.
2010-01-07 09:26:08 +01:00
Henri Verbeet
f5c8153edd
wined3d: Handle stateblock capture for default lights created while recording.
...
For non-recorded stateblocks a light always exists in the device stateblock as
well, since that's where it's copied from. However, when SetLightEnable() is
called for a light that didn't a exist yet while recording a stateblock, the
light is only created on the recorded stateblock.
2010-01-05 12:19:14 +01:00
Henri Verbeet
5bac33d358
wined3d: Remove a few redundant context dereferences.
2010-01-05 12:19:09 +01:00
Stefan Dösinger
a756caac0c
wined3d: Implement subrange flushing with GL_APPLE_flush_buffer_range.
2010-01-04 12:09:34 +01:00
Stefan Dösinger
5296d5b016
wined3d: Prepare for dynamic vertex buffers.
2010-01-04 12:09:28 +01:00
Stefan Dösinger
ccc26a9e01
wined3d: Add GL_APPLE_flush_buffer_range.
2010-01-04 12:09:18 +01:00
Stefan Dösinger
71db272fee
wined3d: Add GLintptr and GLsizeiptr.
2010-01-04 12:09:12 +01:00
Stefan Dösinger
716520b4b8
wined3d: Track separate dirty ranges in buffers.
2010-01-04 12:08:14 +01:00
Stefan Dösinger
1bd98719e6
wined3d: Set WINED3D_BUFFER_CREATEBO in buffer_init().
2010-01-04 12:07:50 +01:00
Stefan Dösinger
b9976c3d20
wined3d: Revert the GL usage confusion.
...
This is functionally a revert of
8eeb513b1a
. The language of the extension
is slightly confusing to me, but GL_STREAM_*_ARB is more dynamic than
GL_DYNAMIC_*_ARB. So use GL_STREAM usage for D3DUSAGE_DYNAMIC buffers and
GL_DYNAMIC usage for non-dynamic buffers.
2010-01-04 12:07:45 +01:00
Gerald Pfeifer
0cf44ae02e
wined3d: Introduce WINED3DFMT_INST and use it in CheckTextureCapability().
2010-01-04 11:49:58 +01:00
Henri Verbeet
ce2c3ea6c7
wined3d: Handle source and destination rectangles in IWineD3DSwapChainImpl_Present().
2010-01-04 11:41:29 +01:00
Henri Verbeet
b5907e23cc
wined3d: Add support for source and destination rectangles to swapchain_blit().
2010-01-04 11:41:29 +01:00
Henri Verbeet
41401fb8cf
wined3d: Add a geometry shader object.
...
This is just the object used to store the byte code, the shader compiler
doesn't know how to handle geometry shaders yet.
2010-01-04 11:41:28 +01:00
Henri Verbeet
f50b4c7d71
wined3d: Move "wrap_lookup" to struct wined3d_gl_info.
2010-01-04 11:41:28 +01:00
William Waghorn
0c582dca3a
wined3d: Added NVidia GT240 detection.
2010-01-04 11:41:27 +01:00
Aaron Brazener
11754a645b
wined3d: Added further Nvidia Geforce 8xxx detection.
2009-12-31 12:12:18 +01:00
Henri Verbeet
2c0edb94e3
wined3d: Fix WINED3DRS_DEPTHBIAS handling.
2009-12-31 12:12:17 +01:00
Henri Verbeet
14da44aa36
wined3d: Merge vertexshader_set_function() and pixelshader_set_function().
2009-12-31 12:12:16 +01:00
Henri Verbeet
b548e387ae
wined3d: Move shader input/output signatures to IWineD3DBaseShaderClass.
2009-12-31 12:12:16 +01:00
Henri Verbeet
736aaf7d09
wined3d: Always handle WINED3DSPR_INPUT registers as input registers in shader_get_registers_used().
...
The "attributes" vertexshader field is now derived from the input signature,
and only used to speed up matching D3D9 vertex declaration elements to shader
inputs. D3D8 and D3D10 both explicitly specify input registers.
2009-12-31 12:12:16 +01:00
Henri Verbeet
2b1ee87328
wined3d: Merge pixelshader.c and vertexshader.c.
2009-12-31 12:12:16 +01:00
Henri Verbeet
2650885cc8
wined3d: Use the element size to create "isStateDirty" bitmap indices.
2009-12-30 13:31:36 +01:00
Henri Verbeet
ea2f7a2739
wined3d: Remove some redundant returns.
2009-12-30 13:31:26 +01:00
Henri Verbeet
67cba48782
wined3d: The FVF parameter to IWineD3DDeviceImpl_CreateVertexBuffer() is unused now.
2009-12-30 13:31:20 +01:00
Henri Verbeet
d588d2b489
wined3d: Clear the device's focus_window field when the window is destroyed.
...
This will prevent the device from trying to unregister the window again on
release.
2009-12-29 11:06:01 +01:00
Henri Verbeet
990c141052
wined3d: Don't touch the window's focus or wndproc for windowed devices.
2009-12-29 11:05:44 +01:00
Aaron Brazener
381fa8931f
wined3d: Added ATI Radeon HD 5xxx detection.
2009-12-29 11:05:39 +01:00
Stefan Dösinger
4f594777a2
wined3d: Drop the VBO if too many full buffer conversions occur.
2009-12-29 11:04:03 +01:00
Stefan Dösinger
9750cca9b1
wined3d: Increment the buffer draw count if the buffer was clean.
2009-12-29 11:03:51 +01:00
Stefan Dösinger
f90b8b6352
wined3d: Rename conversion_count to something more appropriate.
2009-12-29 11:03:44 +01:00
Stefan Dösinger
d6b9732497
wined3d: Remove the d3d7 do-not-convert code.
2009-12-29 11:03:36 +01:00
Stefan Dösinger
1d37ae6f61
wined3d: Use unload instead of duplicating buffer remove code.
2009-12-29 11:03:24 +01:00
Stefan Dösinger
4590dc4806
wined3d: Free buffer conversion info when freeing the buffer.
2009-12-29 11:03:10 +01:00
Henri Verbeet
9c0bf89ed0
wined3d: Let "SetupForBlit()" figure out the target's width and height on its own.
2009-12-28 12:27:14 +01:00
Henri Verbeet
57ff4b4dea
wined3d: Let "FindContext()" figure out the thread id on its own.
...
It doesn't work with anything other than the current thread anyway.
2009-12-28 12:27:13 +01:00
Henri Verbeet
9295de9b84
wined3d: Introduce "context_apply_state()" to setup a context for a specific usage.
2009-12-28 12:27:13 +01:00
Henri Verbeet
f30999f193
wined3d: Recognize "VMware, Inc." as VENDOR_MESA.
2009-12-28 12:27:13 +01:00
Henri Verbeet
7160e56ab1
wined3d: Properly check for glBlitFramebuffer().
...
ARB_framebuffer_object can also provide this entry point.
2009-12-28 12:27:13 +01:00
Henri Verbeet
3288911ae3
wined3d: Use proper enum elements for FOURCC formats.
2009-12-23 14:27:30 +01:00
Henri Verbeet
b49e684f5d
wined3d: Focus the focus window.
2009-12-23 14:27:29 +01:00
Henri Verbeet
a0aa10eb5c
wined3d: Filter messages for the device's focus window instead of the swapchain's device window.
...
Usually these will be the same window, but they don't have to be.
2009-12-23 14:27:29 +01:00
Henri Verbeet
ea0af93c19
wined3d: Get rid of some redundant local variables.
...
E.g. "This" variables that are only used in traces.
2009-12-22 13:48:25 +01:00
Henri Verbeet
d9fefdb917
wined3d: Cleanup IWineD3DBaseSwapChainImpl_QueryInterface().
2009-12-22 13:48:25 +01:00
Henri Verbeet
3f77683174
wined3d: Volumes are resources in wined3d.
2009-12-22 13:48:25 +01:00
Henri Verbeet
8c7d259978
wined3d: IWineD3DPaletteImpl implements IWineD3DBase.
2009-12-21 15:01:25 +01:00
Henri Verbeet
ecf2e049a2
wined3d: IWineD3DClipperImpl implements IWineD3DBase.
...
Unify the QueryInterface implementation a bit with the rest of wined3d while
we're at it.
2009-12-21 15:01:25 +01:00
Henri Verbeet
23bf5025c6
wined3d: Cleanup IWineD3DDeviceImpl_GetRasterStatus().
2009-12-21 15:01:25 +01:00
Henri Verbeet
79a2045395
wined3d: NULL vertex declarations are captured, but not applied.
2009-12-21 15:01:22 +01:00
Henri Verbeet
a389fe551e
wined3d: IWineD3DStateBlockImpl no longer implements IWineD3DBase.
2009-12-18 11:38:59 +01:00
Henri Verbeet
23f05028f8
wined3d: Add some error handling to create_primary_opengl_context().
2009-12-18 11:38:49 +01:00
Henri Verbeet
4c66141c99
wined3d: Add a function to destroy dummy textures.
...
The next patch uses this.
2009-12-18 11:38:43 +01:00
Henri Verbeet
7fe3ab5a23
wined3d: Don't touch "ppSurface" on failure in IWineD3DDeviceImpl_CreateSurface().
...
I originally kept these when adding surface_init() in
5f581975dc
because the original code had them on
most error paths. However, this actually broke ddraw because it assumed we
don't touch "ppSurface" on errors. Just remove these since they're useless
anyway.
2009-12-18 11:38:40 +01:00
Roderick Colenbrander
6d8c4572ef
wined3d: Fix a bug in BtlFast which was uncovered by the 32-bit dibsection support.
2009-12-17 12:53:19 +01:00
Henri Verbeet
bd1ec9eb02
wined3d: Cleanup IWineD3DDeviceImpl_GetBackBuffer().
2009-12-17 12:43:20 +01:00
Henri Verbeet
35d5e7669e
wined3d: Change an ERR to a WARN in IWineD3DVolumeImpl_UnlockBox().
...
Trying to unlock a volume that isn't locked is questionable behaviour on the
side of the application, but not an internal error.
2009-12-17 12:43:16 +01:00
Henri Verbeet
d5a8637ecc
wined3d: Change an ERR to a TRACE in IWineD3DEventQueryImpl_GetData().
...
This is allowed behaviour.
2009-12-17 12:43:11 +01:00
Stefan Dösinger
8eeb513b1a
wined3d: Fix VBO buffer usage.
2009-12-16 13:04:19 +01:00
Stefan Dösinger
718e55b9a6
wined3d: Don't render single buffered swapchains to a FBO.
2009-12-16 12:42:40 +01:00
Henri Verbeet
cd623036fc
wined3d: Mark the draw buffer as dirty in context_create().
...
Currently callers of this function are responsible for setting the draw buffer
correctly, but they don't do a very good job:
- swapchain_init() sets the draw buffer to GL_BACK if there's a back buffer,
even though the context's target is always the front buffer.
- swapchain_create_context_for_thread() depends on (eventually) being called
by FindContext().
- create_primary_opengl_context() and
IWineD3DSwapChainImpl_SetDestWindowOverride() don't bother setting a draw
buffer at all.
Just marking the draw buffer dirty lets the context management sort it all
out, and is much simpler.
2009-12-16 12:22:29 +01:00
Henri Verbeet
a215d326a5
wined3d: Get rid of the "swapchain" parameter to surface_get_gl_buffer().
...
Casting the container to "IWineD3DSwapChainImpl *" is always safe when
SFLAG_SWAPCHAIN is set on the surface. Most callers don't have a real
need for the swapchain, and end up calling GetContainer() just to pass
it to surface_get_gl_buffer().
2009-12-16 12:22:18 +01:00
Henri Verbeet
97f04248fc
wined3d: Use surface_is_offscreen() in flush_to_framebuffer_drawpixels().
2009-12-16 12:22:03 +01:00
Henri Verbeet
bf113bd284
wined3d: Use surface_is_offscreen() in read_from_framebuffer_texture().
2009-12-16 12:21:58 +01:00
Henri Verbeet
51438eec46
wined3d: Use surface_is_offscreen() in fb_copy_to_texture_hwstretch().
2009-12-16 12:21:50 +01:00
Stefan Dösinger
cde3217268
wined3d: Properly release client storage memory.
2009-12-15 16:09:12 +01:00
Stefan Dösinger
2ee6bb1cbb
wined3d: Frontbuffers are onscreen.
2009-12-15 11:58:53 +01:00
Henri Verbeet
2f56ef09e6
wined3d: Use surface_is_offscreen() in context_apply_draw_buffer().
2009-12-15 11:44:20 +01:00
Henri Verbeet
c24e48d937
wined3d: Filter window messages generated by switching to fullscreen and back.
2009-12-15 11:43:56 +01:00
Henri Verbeet
0e270bbd22
wined3d: Send window messages through the swapchain before sending them to the application.
2009-12-15 11:43:41 +01:00
Henri Verbeet
6bf79b885f
wined3d: Let the context handle the draw buffer in swapchain_blit().
2009-12-14 12:04:05 +01:00
Henri Verbeet
82556b613e
wined3d: Let the context handle the draw buffer in fb_copy_to_texture_hwstretch().
2009-12-14 12:04:05 +01:00
Henri Verbeet
59db3ecaa0
wined3d: Let the context handle the draw buffer in flush_to_framebuffer_drawpixels().
2009-12-14 12:04:05 +01:00
Henri Verbeet
30f5883ef5
wined3d: Let the context handle the draw buffer in stretch_rect_fbo().
2009-12-14 12:04:05 +01:00
Henri Verbeet
cb076db8cc
wined3d: Move IWineD3DDeviceImpl_RestoreWindow() to swapchain.c.
2009-12-11 12:16:25 +01:00
Henri Verbeet
542590cfc9
wined3d: Move IWineD3DDeviceImpl_SetupFullscreenWindow() to swapchain.c.
2009-12-11 12:16:25 +01:00
Henri Verbeet
a9f2613d13
wined3d: Add a separate function for swapchain initialization.
2009-12-11 12:16:25 +01:00
Henri Verbeet
75ef50e435
wined3d: Correctly calculate the extended style in IWineD3DDeviceImpl_RestoreWindow().
2009-12-11 12:16:25 +01:00
Henri Verbeet
840b5af77e
wined3d: Properly invalidate the context's draw buffer in color_fill_fbo().
2009-12-11 12:16:25 +01:00
Henri Verbeet
b85a070598
wined3d: Support more formats for display mode enumeration.
...
ddraw/d3d8/d3d9 only support a limited number of formats, but those already
limit the supported formats themselves.
2009-12-10 11:54:55 +01:00
Henri Verbeet
b3defd4c80
wined3d: Rename "wineD3DDevice" to "device".
2009-12-10 11:54:47 +01:00
Henri Verbeet
bd9828a039
wined3d: Don't restore the draw buffer in color_fill_fbo().
...
This should be done by the context management these days.
2009-12-10 11:54:29 +01:00
Henri Verbeet
bfe6695d30
wined3d: Only disable blending for offscreen targets.
2009-12-09 13:51:08 +01:00
Henri Verbeet
b6ef17f23d
wined3d: Remove unused GetDevice() implementations.
2009-12-09 13:51:04 +01:00
Henri Verbeet
d2ad2df637
wined3d: Remove a few redundant assignments.
2009-12-09 13:50:48 +01:00
Henri Verbeet
54f3dec8e6
wined3d: Rename the "wineD3D" device field to "wined3d".
2009-12-08 12:33:29 +01:00
Henri Verbeet
a02f93defb
wined3d: Remove the redundant "adapterNo" field from the device.
2009-12-08 12:33:23 +01:00
Henri Verbeet
aed85222b5
wined3d: Rename the wined3d_adapter "num" field to "ordinal".
...
This makes it consistent with dxgi_adapter.
2009-12-08 12:33:17 +01:00
Henri Verbeet
8a833a2d75
wined3d: Pass the correct vertex count in DrawIndexedPrimitiveStrided().
...
This fixes a regression introduced by 2b2fc827ce
.
2009-12-08 12:33:08 +01:00
Stefan Dösinger
740e2d403e
Render to fbo when the size mismatches at creation time.
...
This is needed because the window(and thus the GL drawable) might be
smaller than the D3D backbuffer. If we waited for the FBO switch until
Present is called we'd lose data in the first frame.
2009-12-07 14:33:56 +01:00
Stefan Dösinger
548b0bcda5
wined3d: Render to a FBO if the window size is changed.
2009-12-07 14:33:32 +01:00
Stefan Dösinger
817714912b
wined3d: Infrastructure to render swapchains to a FBO.
2009-12-07 14:33:24 +01:00
Stefan Dösinger
2b0271b185
wined3d: Use GL_COLOR_ATTACHMENT0 as offscreen buffer with FBOs.
...
This is used by the offscreen render target->texture blit code if
FBOs are enabled, but FBO_blit is not supported
2009-12-07 14:33:04 +01:00
Stefan Dösinger
64291c60cb
wined3d: A function for checking if a surface is offscreen.
2009-12-07 14:32:54 +01:00
Stefan Dösinger
54f0d3f785
wined3d: Add a function for initializing surface sysmem.
2009-12-07 14:32:29 +01:00
Francois Gouget
060934c557
wined3d: Don't define nameless structs or unions.
...
Fixes compilation on systems that don't support nameless unions or structs.
2009-12-07 14:18:25 +01:00
Henri Verbeet
0491fcce30
dxgi: Implement IDXGIAdapter::GetDesc().
2009-12-04 14:34:59 +01:00
Henri Verbeet
dd5fc79f56
wined3d: The stateblock doesn't really need a parent.
2009-12-04 14:34:59 +01:00
Stefan Dösinger
6a19339207
wined3d: Remove needless NULL checks (coverity).
2009-12-03 11:45:15 +01:00
Henri Verbeet
ed73f0a1b0
d3d9: Implement IDirect3D9Ex::GetAdapterLUID().
2009-12-02 13:06:08 +01:00
Henri Verbeet
36823dd96b
wined3d: Set appropriate error codes in IWineD3DDeviceImpl_Init3D() on out of memory.
2009-12-02 13:06:07 +01:00
Marcus Meissner
a7e599db45
wined3d: Handle NULL ptrs (Coverity).
2009-11-24 10:51:46 +01:00
Henri Verbeet
55f3c576d9
wined3d: Remove the effetively unused "state" field from the device.
2009-11-18 11:16:54 +01:00
Henri Verbeet
135e6cea7b
wined3d: Add a separate function for device initialization.
2009-11-18 11:16:49 +01:00
Henri Verbeet
e4d8a3f309
wined3d: Move the various backend selection utility functions to utils.c.
2009-11-18 11:16:43 +01:00
Henri Verbeet
7676c66431
wined3d: WINED3DFMT_FLAG_GETDC is a basic format flag.
...
It has nothing to do with OpenGL, so shouldn't be in "gl_formats_template".
This fixes a regression introduced by e1469961d4
.
2009-11-17 15:14:54 +01:00
Henri Verbeet
db2273652d
wined3d: Add a format table for basic format flags like WINED3DFMT_FLAG_FOURCC.
2009-11-17 15:14:54 +01:00
Anders Jonsson
58b203e798
wined3d: Fix typo.
2009-11-16 13:47:49 +01:00
Stefan Dösinger
0e77a381ea
wined3d: Create clip coords only if they are used.
...
If GL vertex shader clipping is supported (GLSL or NVvp), we currently
always calculate clipping results in the shader. They're gracefully
discarded by opengl, but we need 6 constants / uniforms to calculate
unused values.
2009-11-12 15:18:00 +01:00
Henri Verbeet
5487009624
wined3d: Report a driver version appropriate for the reported OS.
2009-11-12 13:14:39 +01:00
Henri Verbeet
8d351a1141
wined3d: Initialize "context[0]" in IWineD3DDeviceImpl_CreateSwapChain() when not using OpenGL (Valgrind).
2009-11-04 13:07:57 +01:00
Austin English
5f0940e08a
wined3d: Add version resource.
2009-11-04 11:54:59 +01:00
Marcus Meissner
9f8a73ab96
wined3d: Check for NULL before context_release (Coverity).
2009-11-03 21:22:46 +01:00
Stefan Dösinger
8eef221d20
d3d: Handle the pointsize_min default difference in d3d8.
2009-11-03 21:22:12 +01:00
Stefan Dösinger
d4275e87f1
wined3d: Add a usage flag for static buffer declarations.
2009-11-03 21:21:55 +01:00
Stefan Dösinger
63326b1925
wined3d: Add a usage flag for vertex buffer optimization.
2009-11-03 21:21:48 +01:00
Stefan Dösinger
90e443758a
wined3d: Add a parameter for SetRenderTarget viewport setup.
2009-11-03 21:21:30 +01:00
Henri Verbeet
bf10dbe8a6
wined3d: Map D3DFMT_D24S8 to WINED3DFMT_D24_UNORM_S8_UINT.
...
The internal order of the depth and stencil bits is unspecified since the
format isn't lockable.
2009-10-30 11:28:52 +01:00
Henri Verbeet
fbae08672b
wined3d: It's not an error to request multisampling.
2009-10-30 11:28:35 +01:00
Henri Verbeet
be8026adf6
wined3d: directly pass gl_info to stream_info_element_from_strided().
2009-10-29 13:09:37 +01:00
Henri Verbeet
111307dfba
wined3d: Get rid of the GL_SUPPORT macro.
2009-10-29 13:09:33 +01:00
Henri Verbeet
48e03bc189
wined3d: Introduce a separate structure for various OpenGL implementation limits.
2009-10-29 13:09:27 +01:00
Henri Verbeet
d7b087618b
wined3d: Remove some unused GLINFO_LOCATION definitions.
2009-10-29 13:09:20 +01:00
Henri Verbeet
e6ca176a48
wined3d: Rename DestroyContext() to context_destroy().
2009-10-28 11:16:05 +01:00
Henri Verbeet
c0050b8ec9
wined3d: Restore the thread's GL context on context_release() if it wasn't created by wined3d.
...
The background on this is that some applications use OpenGL and DirectDraw/Direct3D on
the same thread, typically using OpenGL for rendering and DirectDraw to get
the amount of available video memory. This means that we might replace the
application's current GL context with one with a completely different state,
but also that our current GL context might not be what we think it is.
2009-10-28 11:15:59 +01:00
Henri Verbeet
98027cb535
wined3d: Call context_release() for wined3d contexts made current by context_create().
2009-10-28 11:15:27 +01:00
Henri Verbeet
eeb54b9922
wined3d: Keep better track of where we're using wined3d contexts.
...
The idea here is that we can restore the thread's current GL context on
context_release() if it doesn't correspond to the current wined3d context on
context_acquire().
2009-10-28 11:15:19 +01:00
Henri Verbeet
401173ffde
wined3d: Restore the thread's previous GL context in context_destroy_gl_resources().
2009-10-28 11:15:00 +01:00
Henri Verbeet
30d2660d99
wined3d: Restore the thread's previous GL context in WineD3D_ReleaseFakeGLContext().
2009-10-27 10:55:35 +01:00
Henri Verbeet
94509f85b5
wined3d: Restore the wglMakeCurrent() call in context_destroy_gl_resources().
...
e3ca576576
removed this call because we don't
need it to tell if the context is valid, but we still need it to actually make
the context current.
2009-10-27 10:55:27 +01:00
Henri Verbeet
13c4fe72ad
wined3d: Set a driver name appropriate for the vendor in init_driver_info().
2009-10-27 10:55:09 +01:00
Henri Verbeet
26ba212407
wined3d: Apply PCI ID overrides in init_driver_info() instead of IWineD3DImpl_GetAdapterIdentifier().
2009-10-27 10:54:57 +01:00
Henri Verbeet
2447c8bc3e
wined3d: Store PCI IDs in wined3d_driver_info instead of wined3d_gl_info.
2009-10-27 10:54:50 +01:00
Stefan Dösinger
0c72464abf
wined3d: Use the native constant limit for fitting private constants.
2009-10-26 11:42:36 +01:00
Stefan Dösinger
9ee6508132
wined3d: Remove dead code.
2009-10-26 11:42:29 +01:00
Stefan Dösinger
f15fc8f41c
wined3d: Take native constants into account when reporting ARB limits.
2009-10-26 11:42:20 +01:00
Stefan Dösinger
641d6681d4
wined3d: Use the ARB native constant limit in the GLSL-ARB constants quirk.
...
Geforce 8 and Geforce 9 cards support 256 env and 1024 native
constants. 1024 is the hardware limit we want to use if we overwrite
the GLSL reported value with the ARB value on Mac OS (because Mac OS
reports more constants than supported by HW on some cards).
2009-10-26 11:42:10 +01:00
Stefan Dösinger
f9c4d442a9
wined3d: Get rid of the general shader constant limit.
2009-10-26 11:41:51 +01:00
Stefan Dösinger
70d6304a21
wined3d: Use the shader backend reported constant limit outside the shader backend.
2009-10-26 11:41:43 +01:00
Henri Verbeet
483d5d0a0d
wined3d: Print an ERR instead of crashing in context_check_fbo_status().
...
Some version of Mesa will claim the window system provided framebuffer is
incomplete when using indirect rendering, although the framebuffer objects
spec says this can never happen. Printing an ERR instead of crashing should
make it clearer that this isn't a wined3d problem.
2009-10-26 11:20:52 +01:00
Henri Verbeet
d03a105c1a
wined3d: Fix a typo.
2009-10-26 11:20:44 +01:00
Henri Verbeet
de82b55b20
wined3d: Refuse to parse shaders with an invalid version token.
2009-10-26 11:20:39 +01:00
Henri Verbeet
5fbe5ee027
wined3d: Add a separate structure for driver info.
2009-10-26 11:20:33 +01:00
Henri Verbeet
69bf130476
wined3d: Remove a redundant ActivateContext() call.
2009-10-26 11:20:26 +01:00
Henri Verbeet
ade350b4d4
wined3d: Compare and copy the actual palette in palette9_changed() (Valgrind).
2009-10-23 12:03:37 +02:00
Henri Verbeet
53104ac1e7
wined3d: Don't use the stack as cursor mask (Valgrind).
2009-10-23 12:03:30 +02:00
Henri Verbeet
342a71b281
wined3d: Replace the "stateLookup" tables with a single "wrap_lookup" table.
2009-10-23 12:03:15 +02:00
Henri Verbeet
a927573395
wined3d: Free the context array in IWineGDISwapChainImpl_Destroy() (Valgrind).
2009-10-22 10:46:20 +02:00
Henri Verbeet
8d2512317f
wined3d: Free the blitter private data in arbfp_blit_free() (Valgrind).
2009-10-22 10:46:15 +02:00
Henri Verbeet
6be41fd59a
wined3d: Get rid of GL_LIMITS.
2009-10-22 10:46:05 +02:00
Henri Verbeet
55047f811a
wined3d: Fix some GLINFO_LOCATION abuse.
2009-10-22 10:45:57 +02:00
Henri Verbeet
fa548414f9
wined3d: Free the shader buffer in shader_glsl_free() (Valgrind).
2009-10-21 16:05:57 +02:00
Henri Verbeet
42eb516d96
wined3d: Free the adapter's format info in IWineD3DImpl_Release() (Valgrind).
2009-10-21 16:05:57 +02:00
Henri Verbeet
f2aaca2f67
wined3d: Rename WineD3DAdapter to wined3d_adapter.
2009-10-21 16:05:57 +02:00
Stefan Dösinger
122ed40c2b
wined3d: Use ARB constant limits in ARB.
2009-10-20 14:46:16 +02:00
Stefan Dösinger
435646550b
wined3d: Use GLSL constant limits in GLSL.
2009-10-20 14:46:13 +02:00
Stefan Dösinger
2d802af4d9
wined3d: Make shader specific constants accessible via GL_LIMITS.
2009-10-20 14:46:08 +02:00
Henri Verbeet
94d33d3e86
wined3d: Destroy FBO entries from the context that created them.
...
EXT_framebuffer_object doesn't specify if FBOs are shareable between GL
contexts, but ARB_framebuffer_object explicitly prohibits it.
2009-10-20 14:00:37 +02:00
Henri Verbeet
e3ca576576
wined3d: Use context->valid in context_destroy_gl_resources().
...
Instead of relying on wglMakeCurrent() to do what we want.
2009-10-20 14:00:36 +02:00
Henri Verbeet
43aaaa8a4b
wined3d: Validate the D3D context in FindContext().
...
Apparently it's valid to use a D3D device after its window is destroyed.
OpenGL isn't always so forgiving, so this patch is a first step to avoid
making GL calls on a context without window.
2009-10-20 14:00:36 +02:00
Henri Verbeet
0cb6f28751
wined3d: Get rid of the useless "isPBuffer" bitfield in struct wined3d_context.
2009-10-20 14:00:36 +02:00
Henri Verbeet
adf5bb5f6a
wined3d: Cleanup IWineD3DDeviceImpl_UpdateTexture().
...
The root problem here is that with the original error handling a NULL
dereference occurs (IWineD3DBaseTexture_GetType()) when either the source or
destination texture is NULL. Rewriting the error handling changes the
indentation of almost the entire function though, so this patch ends up
rewriting the entire function.
2009-10-19 11:45:45 +02:00
Henri Verbeet
9dd78e13d5
wined3d: Printing a FIXME once only works if the relevant BOOL is static (LLVM/Clang).
2009-10-16 13:37:21 +02:00
Henri Verbeet
594497f4bb
wined3d: Simplify IWineD3DStateBlockImpl_Apply().
...
Consistently use the stateblock's contained states to determine what to apply.
2009-10-15 12:06:18 +02:00
Henri Verbeet
ce10d5f186
wined3d: Don't apply more than num_contained_render_states in IWineD3DStateBlockImpl_Apply().
2009-10-15 12:06:18 +02:00
Henri Verbeet
bac6486520
wined3d: Merge some bitfields in struct SAVEDSTATES.
2009-10-14 11:26:44 +02:00
Henri Verbeet
1f029a30db
wined3d: Simplify IWineD3DStateBlockImpl_Capture().
...
Consistently use the stateblock's contained states to determine what to
capture.
2009-10-14 11:26:38 +02:00
Henri Verbeet
a24d14796a
wined3d: Remove the useless "changed" and "enabledChanged" fields from struct wined3d_light_info.
2009-10-14 11:26:26 +02:00
Henri Verbeet
3bc9d1894d
wined3d: Rename PLIGHTINFOEL to something less awful.
2009-10-14 11:26:17 +02:00
Henri Verbeet
580cd8c5bb
wined3d: Get rid of stateblock_copy_values().
...
Use IWineD3DStateBlockImpl_Capture() for the initial stateblock capture
instead.
2009-10-14 11:26:02 +02:00
Henri Verbeet
8949a2c1ad
wined3d: Remove some code that doesn't make sense.
...
This was introduced by abb11f30cd
, but I don't
see how it could ever do something useful. Perhaps that's a lack of
imagination on my part, but the only situation in which device->stateBlock
should be NULL is while creating the initial stateblock, and in that case we
just returned in the line above. Setting the stream frequency of all streams
to 0x01010101 doesn't make sense either.
2009-10-13 11:38:28 +02:00
Henri Verbeet
da5b491606
wined3d: Capture on a recorded stateblock doesn't record the vertexdeclaration in d3d9.
2009-10-13 11:38:28 +02:00
Henri Verbeet
526839068f
wined3d: Vertex state stateblocks should also record the vertex declaration.
2009-10-13 11:38:28 +02:00
Jeff Zaroyko
a1126242a7
wined3d: Fix prototype for set_texture_matrix.
2009-10-12 17:07:03 +02:00
Henri Verbeet
3dbfda1ab3
wined3d: Capture some more renderstates in vertex and pixel stateblocks.
2009-10-09 11:50:29 +02:00
Henri Verbeet
442beb1dcf
wined3d: Clear resources that we aren't recording in stateblock_init().
2009-10-09 11:50:29 +02:00
Stefan Dösinger
8a68f418db
wined3d: Don't reserve clipping constants needlessly.
2009-10-08 12:03:50 +02:00
Stefan Dösinger
ed2860f789
wined3d: Split the clip_parameters[2] array.
2009-10-08 12:03:42 +02:00
Stefan Dösinger
7f6ae94c0a
wined3d: Don't write to result.color in arb_add_sRGB_correction.
...
add_sRGB_correction and the generate_pshader function generate the same MOV.
There's no need to do it in two places.
2009-10-08 12:03:30 +02:00
Henri Verbeet
2be38232ea
wined3d: Remove some unused code.
2009-10-06 12:02:59 +02:00
Henri Verbeet
92d22ce535
wined3d: Move the SM1 opcode enum to shader_sm1.c.
2009-10-06 12:02:52 +02:00
Henri Verbeet
5c22971561
wined3d: Keep a reference to the vertex declaration initially captured by CreateStateBlock() as well.
2009-10-06 12:02:48 +02:00
Henri Verbeet
b5de2fcb1c
wined3d: Keep references to the textures initially captured by CreateStateBlock() as well.
2009-10-06 12:02:44 +02:00
Stefan Dösinger
cb5ce03de4
wined3d: SetRenderTarget resets the scissor rect.
2009-10-02 15:06:57 +02:00
Stefan Dösinger
4a3f04cb56
wined3d: SetRenderTarget bypasses stateblock recording.
2009-10-02 15:06:57 +02:00
Stefan Dösinger
9e068a33b3
wined3d: SetRenderTarget doesn't change the viewport in d3d7.
2009-10-02 15:06:56 +02:00
Stefan Dösinger
eda00d97ad
d3d9: Test viewports that are bigger than the surface.
2009-10-02 15:06:38 +02:00
Stefan Dösinger
dc45657f2c
wined3d: Fix vs_2_0 sgn.
...
vs_2_0's sgn has two extra parameters - temporary registers for the
instruction. This patch fixes the crash of the d3d9:visual test on windows and
properly handles the vs_2_0 version of sgn.
2009-10-02 12:36:59 +02:00
Henri Verbeet
048c9450d9
wined3d: Use the actual array sizes to determine the number of the various pixel/vertex states.
2009-10-02 11:53:09 +02:00
Henri Verbeet
8b3f868774
wined3d: Move the pixel/vertex states arrays to stateblock.c.
2009-10-02 11:53:03 +02:00
Henri Verbeet
a84974e2ea
wined3d: Fix the values of NUM_SAVEDPIXELSTATES_T and NUM_SAVEDVERTEXSTATES_R.
2009-10-02 11:52:54 +02:00
Henri Verbeet
15d4eee58b
wined3d: Use stateblock_init_contained_states() for WINED3DSBT_VERTEXSTATE stateblocks.
2009-10-02 11:52:49 +02:00
Henri Verbeet
d500c9b795
wined3d: Add a separate function to initialize the saved states for WINED3DSBT_VERTEXSTATE.
2009-10-02 11:52:43 +02:00
Stefan Dösinger
c749debec6
wined3d: Fix an error string.
2009-10-01 12:10:35 +02:00
Henri Verbeet
93c949eba5
wined3d: Use stateblock_init_contained_states() for WINED3DSBT_PIXELSTATE stateblocks.
2009-10-01 12:03:55 +02:00
Henri Verbeet
5a01619d31
wined3d: Add a separate function to initialize the saved states for WINED3DSBT_PIXELSTATE.
2009-10-01 12:03:49 +02:00
Henri Verbeet
841afe485e
wined3d: Use stateblock_init_contained_states() for WINED3DSBT_ALL stateblocks.
2009-10-01 12:03:34 +02:00
Henri Verbeet
c5029f83ec
wined3d: Simplify stateblock_savedstates_set().
...
We only need to handle the case where "value" is TRUE, since the stateblock
data will be filled with zeroes by default.
2009-10-01 12:03:28 +02:00
Henri Verbeet
75fe879c76
wined3d: Get rid of stateblock_savedstates_copy().
...
This is redundant because we call stateblock_savedstates_set() further down.
2009-10-01 12:03:21 +02:00
Henri Verbeet
be0b7355fc
wined3d: Add a separate function for initializing the "contained_*" fields from the "changed" field.
2009-09-30 14:31:59 +02:00
Henri Verbeet
5f3425b89b
wined3d: Get rid of stateblock_copy().
2009-09-30 14:31:59 +02:00
Henri Verbeet
345b329217
wined3d: Add a separate function for copying stateblock values.
2009-09-30 14:31:58 +02:00
Henri Verbeet
844dda20ff
wined3d: Make some internal stateblock function arguments const.
2009-09-30 14:31:58 +02:00
Henri Verbeet
5737efe71a
wined3d: Explicitly pass gl_info to stateblock_savedstates_set().
2009-09-30 14:31:58 +02:00
Henri Verbeet
49f712beff
wined3d: Explicitly pass gl_info to stateblock_savedstates_copy().
2009-09-29 14:22:34 +02:00
Henri Verbeet
6d3e5a9cce
wined3d: Pass IWineD3DStateBlockImpl pointers to stateblock_copy().
2009-09-29 14:22:34 +02:00
Henri Verbeet
4ed126f5dc
wined3d: Clear the correct "activeLights" array in stateblock_copy().
2009-09-29 14:22:34 +02:00
Henri Verbeet
664057ce6a
wined3d: Add a separate function for state block initialization.
2009-09-29 14:22:34 +02:00
Henri Verbeet
6a7b97b617
wined3d: Fix a typo.
2009-09-29 14:22:34 +02:00
Stefan Dösinger
404aecb8da
wined3d: Test if result.clip[] works correctly.
...
The Mac Nvidia driver doesn't implement the result.clip part of
GL_NV_vertex_program2_option correctly. It complains about a syntax
error if "result.clip[0]" is used. "result.clip" compiles correctly, but
supports only one clipplane, and running the shader results in severe
rendering bugs.
2009-09-28 17:33:07 +02:00
Stefan Dösinger
77a83aee79
wined3d: Don't use GL_NV_texture_shader on OSX.
2009-09-28 17:32:54 +02:00
Henri Verbeet
f9786d7eda
wined3d: Just use the actual array size as argument to memcpy() in stateblock_copy().
2009-09-28 12:38:39 +02:00
Henri Verbeet
26db0be136
wined3d: Cleanup IWineD3DDeviceImpl_SetTexture() a bit.
2009-09-28 12:38:32 +02:00
Henri Verbeet
f6bf219013
wined3d: Remove some redundant code in IWineD3DVertexDeclarationImpl_Release().
...
The situation the code tests for should never happen because either the
stateblock will still have a reference to the vertex declaration, or the
stateblock itself will be released.
2009-09-28 12:38:25 +02:00
Henri Verbeet
dca3c6e7c6
wined3d: Keep vertex declaration references in the stateblock.
2009-09-28 12:38:18 +02:00
Henri Verbeet
709aedf5f9
wined3d: Properly keep texture references in the stateblock.
2009-09-28 12:38:12 +02:00
Henri Verbeet
cd96c6e355
wined3d: Release the stateblock before destroying the GL context.
2009-09-25 15:15:49 +02:00
Henri Verbeet
47c84f4f7f
wined3d: Use the DXGI naming convention for all formats.
2009-09-25 15:15:44 +02:00
Henri Verbeet
a25ac586c6
wined3d: Add a state handler for WINED3DRS_SOFTWAREVERTEXPROCESSING.
2009-09-25 15:15:08 +02:00
Henri Verbeet
c64da00de7
wined3d: Rename IWineD3DDevice::GetIndices() to IWineD3DDevice::GetIndexBuffer().
2009-09-25 15:14:52 +02:00
Henri Verbeet
60e32659a7
wined3d: Rename IWineD3DDevice::SetIndices() to IWineD3DDevice::SetIndexBuffer().
2009-09-25 15:14:44 +02:00
Henri Verbeet
f88c6e5ce5
wined3d: Move common shader fields to IWineD3DBaseShaderClass.
2009-09-25 15:14:35 +02:00
Henri Verbeet
77086e8e84
wined3d: Remove SetFunction() from the public shader interface.
2009-09-25 15:14:26 +02:00
Henri Verbeet
d76c7a8521
wined3d: Move some common shader functions to the IWineD3DBaseShader interface.
2009-09-25 15:14:17 +02:00
Austin English
5d15da6df5
wined3d: Recognize DRI R300 drivers as Mesa.
2009-09-25 13:15:48 +02:00
Henri Verbeet
789372afa8
wined3d: Don't free D3D pixel shaders until the wined3d pixel shader is destroyed.
2009-09-24 13:24:53 +02:00
Henri Verbeet
8aea1b1302
wined3d: Add a separate function for pixel shader initialization.
2009-09-24 13:24:27 +02:00
Henri Verbeet
ca05ef5dd0
wined3d: Don't free D3D vertex shaders until the wined3d vertex shader is destroyed.
2009-09-24 13:24:19 +02:00
Henri Verbeet
462decdfb9
wined3d: Add a separate function for vertex shader initialization.
2009-09-24 13:23:51 +02:00
Henri Verbeet
5ac3ed7f73
wined3d: Remove unused IWineD3DVertexShaderImpl fields.
2009-09-24 13:23:44 +02:00
Stefan Dösinger
4fe014cb54
wined3d: Fix sRGB->RGB copy condition.
...
The old condition happened to work, because SFLAG_INTEXTURE was not
set(we're loading it), and neither was SFLAG_INDRAWABLE(otherwise
INTEXTURE would be set too). If the fbo INDRAWABLE == INTEXTURE is
replaced by INDRAWABLE == INSRGBTEX this doesn't hold true any longer
because SFLAG_INDRAWABLE is set, but not used because the drawable
readback is never used for fbos.
2009-09-23 13:25:33 +02:00
Stefan Dösinger
33ca3c0207
wined3d: Don't mark SFLAG_INTEXTURE up to date with fbo stretchrect.
...
FBO stretchrect marks SFLAG_INDRAWABLE up to date, which currently
also marks SFLAG_INTEXTURE up to date. However, this will change when
we enable rendering to the srgb copy, in which case the drawable could
be equal to the srgb copy, not the rgb copy.
2009-09-23 13:25:21 +02:00
Stefan Dösinger
ba6fac697a
wined3d: Create a separate function for deleting GL textures.
2009-09-23 13:25:02 +02:00