Commit Graph

6143 Commits

Author SHA1 Message Date
Henri Verbeet d1e44ff775 wined3d: Pass a resource to wined3d_resource_free_sysmem(). 2013-09-16 12:51:13 +02:00
Henri Verbeet 261246ef21 wined3d: Pass a resource to wined3d_resource_allocate_sysmem(). 2013-09-16 12:51:13 +02:00
Henri Verbeet fc85f4f7d6 wined3d: Never set the first render target to the front buffer in wined3d_device_init_3d(). 2013-09-13 10:57:00 +02:00
Henri Verbeet 3c023a5db5 wined3d: Just set the first render target to NULL in wined3d_device_reset(). 2013-09-13 10:56:52 +02:00
Henri Verbeet def0558b45 wined3d: Just set the first render target to NULL in wined3d_device_uninit_3d(). 2013-09-13 10:56:49 +02:00
Stefan Dösinger b8eb171b6b wined3d: Explicitly pass the state information to buffer_internal_preload. 2013-09-12 17:48:20 +02:00
Stefan Dösinger d8c43aabf7 wined3d: Move the decoded stream info into the context. 2013-09-12 17:48:14 +02:00
Stefan Dösinger a0b56d9c59 wined3d: Pass stream info and needed fixups to buffer_find_decl. 2013-09-12 17:48:11 +02:00
Henri Verbeet 1a78667862 wined3d: Allow the first render target to be set to NULL.
Note that it still isn't necessarily safe to render in this case, because
there are places where we assume the first render target is always non-NULL in
order to determine e.g. framebuffer dimensions. It's now the responsibility of
the caller to ensure that doesn't happen.
2013-09-12 10:59:18 +02:00
Henri Verbeet 1b53cbd8de wined3d: Make primary_render_target_is_p8() work on a swapchain. 2013-09-12 10:59:11 +02:00
Stefan Dösinger b4d8b52fa7 wined3d: Pass position_transformed and gl_info to find_ps_compile_args. 2013-09-11 17:09:59 +02:00
Stefan Dösinger dfeee9077c wined3d: Pass the swizzle map to find_vs_compile_args. 2013-09-11 17:09:56 +02:00
Henri Verbeet 1453baf64b wined3d: Properly check if the swapchain format is WINED3DFMT_P8_UINT in primary_render_target_is_p8(). 2013-09-11 09:58:52 +02:00
Henri Verbeet aea8d5c11e wined3d: Get rid of the render target / overlay check in wined3d_surface_flip().
The surface needs to be part of a swapchain to be flipped, but that doesn't
have much to do with WINED3DUSAGE_RENDERTARGET. We can just remove the check
here, because ddraw_surface7_Flip() already has the correct check.
2013-09-11 09:58:50 +02:00
Henri Verbeet d21c26e4f6 wined3d: Get rid of surface_modify_location(). 2013-09-10 11:09:53 +02:00
Henri Verbeet b62915dabb wined3d: Replace surface_modify_location(surface, location, FALSE) calls with surface_invalidate_location(). 2013-09-10 11:09:51 +02:00
Henri Verbeet c6ce5486c0 wined3d: Get rid of the special SFLAG_INTEXTURE / SFLAG_INSRGBTEX code in surface_modify_location().
It turns out this is already safe for all callers.
2013-09-10 11:09:48 +02:00
Stefan Dösinger cd203b38a6 wined3d: Pass the context to the main buffer preload function. 2013-09-09 22:10:01 +02:00
Stefan Dösinger 87f931dc64 wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_get_sysmem(). 2013-09-09 22:10:00 +02:00
Stefan Dösinger 1cf192172e wined3d: Only invalidate STATE_INDEXBUFFER for the current context in buffer_create_buffer_object(). 2013-09-09 22:10:00 +02:00
Henri Verbeet e2f4ab4607 wined3d: Rewrite surface_modify_location() on top of surface_validate_location() and surface_invalidate_location(). 2013-09-09 22:09:58 +02:00
Henri Verbeet 59e2f52ff8 wined3d: Replace the "dirty" field in struct gl_texture with WINED3D_TEXTURE_ flags. 2013-09-09 22:09:58 +02:00
Henri Verbeet c44012f0c1 wined3d: Get rid of the "dirty" flag to wined3d_texture_set_dirty(). 2013-09-09 22:09:57 +02:00
Stefan Dösinger df5a0976e9 wined3d: Check the format block size before creating textures.
Sizes of textures and stand-alone surfaces must be multiples of the
format's block size for DXTN formats. Since we create a texture for
everything (except in ddraw), this check also takes care of stand-alone
surfaces.
2013-09-06 17:25:08 +02:00
Stefan Dösinger 80638b6d2f wined3d: Enforce texturing capability format restrictions on resource creation. 2013-09-06 17:25:08 +02:00
Henri Verbeet 7859509f5b wined3d: Get rid of the SFLAG_INTEXTURE / SFLAG_INSRGBTEX check in surface_set_texture_name(). 2013-09-06 12:00:12 +02:00
Henri Verbeet 137590be31 wined3d: Return 1 instead of 0 for max_vertex_blend_matrices in glsl_vertex_pipe_vp_get_caps().
It's not necessarily clear to me that one is better than the other here, but
this is what we returned in the old GL fixed function implementation of the
D3D fixed function vertex pipe, and apparently EverQuest depends on this.

This fixes a regression introduced by commit 2014141a25.
2013-09-06 12:00:09 +02:00
Stefan Dösinger b73464a413 wined3d: Use the ftoa helper function in the ARB shader backend.
This is the ARB equivalent to e0494afa00.
2013-09-05 17:55:48 +02:00
Stefan Dösinger 37c4f3a88c wined3d: Don't clamp texture lookups in the ARB fixed function fragment pipe. 2013-09-05 17:55:11 +02:00
Henri Verbeet ad178a5b55 wined3d: Enforce WINED3DUSAGE_DEPTHSTENCIL format restrictions on resource creation. 2013-09-05 13:18:24 +02:00
Henri Verbeet b28e9f6482 wined3d: Enforce WINED3DUSAGE_RENDERTARGET format restrictions on resource creation. 2013-09-05 13:18:23 +02:00
Henri Verbeet 6325f3ddd8 wined3d: Don't set WINED3DUSAGE_RENDERTARGET on the front buffer.
We never render directly to the front buffer, and in case of e.g. a P8 front
buffer, we would fail surface creation if we were to enforce format
restrictions.
2013-09-04 11:37:01 +02:00
Henri Verbeet 99092c2700 wined3d: Avoid a couple of useless glGetUniformLocationARB() calls. 2013-09-04 11:36:58 +02:00
Henri Verbeet ff6ce4c669 wined3d: Use clamp() instead of max() for calculating the clamped cosine in the ffp lighting calculations.
On typical hardware, the clamp() would be an instruction modifier, while the
max() would need an extra instruction.
2013-09-04 11:36:50 +02:00
Henri Verbeet 0d2d847914 wined3d: Don't clamp texture lookups in the GLSL fixed function fragment pipe. 2013-09-03 16:58:17 +02:00
Henri Verbeet 50e2ee73a4 wined3d: Rename wined3d_fake_gl_ctx to wined3d_caps_gl_ctx.
There's nothing particularly fake about the GL context.
2013-09-03 16:58:16 +02:00
Henri Verbeet 36dcb77f6e wined3d: Get rid of some leftover references to IWineD3D. 2013-09-03 16:58:16 +02:00
Henri Verbeet 0be8e524c6 wined3d: Avoid some forward declarations. 2013-09-02 18:02:42 +02:00
Henri Verbeet b5e0c5d052 wined3d: Get rid of some leftover comments referring to the GL lock. 2013-09-02 18:02:26 +02:00
Henri Verbeet 2d23913186 wined3d: Move the MAXLOCKCOUNT constant to surface.c. 2013-09-02 18:02:23 +02:00
Henri Verbeet f7b84fe755 wined3d: Move the DEFAULT_REFRESH_RATE constant to directx.c. 2013-08-30 11:18:49 +02:00
Henri Verbeet 53f747de1b wined3d: Move the WINED3D_MAX_FBO_ENTRIES constant to context.c. 2013-08-30 11:18:46 +02:00
Henri Verbeet 35a8bf0e1e wined3d: Move the buffer flags to buffer.c. 2013-08-30 11:18:43 +02:00
Henri Verbeet 805fc64198 wined3d: Get rid of the unused WINED3D_BUFFER_OPTIMIZED flag. 2013-08-29 19:56:17 +02:00
Henri Verbeet 43ecaf29c3 wined3d: Get rid of the DDRAW_PITCH_ALIGNMENT and D3D8_PITCH_ALIGNMENT constants. 2013-08-29 19:56:17 +02:00
Henri Verbeet 605136ab04 wined3d: Get rid of the SHADER_PGMSIZE constant. 2013-08-29 19:56:17 +02:00
Henri Verbeet ac54753e7c wined3d: Get rid of RTL_READDRAW.
I don't think we ever want to use glDrawPixels().
2013-08-28 11:17:09 +02:00
Henri Verbeet f5f7a4e457 wined3d: Get rid of GL_EXT_paletted_texture support.
No current drivers support this, and it's probably broken. Also note that
since we removed paletted texture support from wined3d, this would only be
used for WINED3DFMT_P8_UINT blits.
2013-08-28 11:17:09 +02:00
Henri Verbeet 00ffc0c24b wined3d: Get rid of the unused MAX_PALETTES constant. 2013-08-28 11:17:08 +02:00
Henri Verbeet b85c2a74bb wined3d: Replace the "stateBlock" wined3d_device field with a wined3d_state structure. 2013-08-27 11:50:53 +02:00