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