Stefan Dösinger
24fbe9f2ec
wined3d: Pass the destination pitch to format conversion functions.
...
The relation between src and dst pitches is not correct if the source
pitch is padded to match pitch alignment requirements.
2013-09-20 17:04:04 +02:00
Henri Verbeet
0eae0858ae
wined3d: Set the default scissor rect from the swapchain desc in state_init_default().
...
We always have a swapchain here, even if there are no back buffers.
2013-09-20 11:27:43 +02:00
Henri Verbeet
49c6b87a32
wined3d: Only print a warning about render target usage in wined3d_device_set_render_target().
2013-09-20 11:27:40 +02:00
Stefan Dösinger
d15042837a
wined3d: Pass a correct access flag to glMapBufferARB.
2013-09-19 19:49:49 +02:00
Stefan Dösinger
e9b4f154dd
wined3d: Don't use volume->resource.allocatedMemory.
...
Depending on the location flags, the buffer or heap_memory should be
used.
2013-09-19 19:49:43 +02:00
Henri Verbeet
5bd3bfff99
wined3d: Avoid LPVOID.
2013-09-19 19:49:01 +02:00
Henri Verbeet
e9fbb6b0fd
wined3d: Avoid LPCSTR.
2013-09-19 19:49:00 +02:00
Stefan Dösinger
2680f33015
wined3d: Check box dimensions in volume_map.
2013-09-18 15:47:00 +02:00
Stefan Dösinger
ac37f7a2ac
wined3d: Implement locking of block-based volume textures.
2013-09-18 15:46:56 +02:00
Stefan Dösinger
83b404879c
wined3d: Mapping a mapped volume is an error.
2013-09-18 15:46:49 +02:00
Stefan Dösinger
bbfca4863c
wined3d: Store the instance count in the context structure.
2013-09-16 13:06:03 +02:00
Stefan Dösinger
59e0b841c7
wined3d: Move device_preload_textures into context.c.
2013-09-16 13:06:01 +02:00
Stefan Dösinger
112617f00b
wined3d: Move tex_unit_map and friends into the context.
2013-09-16 13:05:58 +02:00
Stefan Dösinger
f29c24f2de
wined3d: Pass the context to surface_internal_preload.
2013-09-16 13:05:55 +02:00
Stefan Dösinger
fe44be5fde
wined3d: Pass the context to the internal texture_preload function.
2013-09-16 13:05:52 +02:00
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