Matteo Bruni
8ed9c2a11b
wined3d: Add a couple checkGLcall() in surface_prepare_rb().
2015-03-02 13:47:56 +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
d56c168da1
wined3d: Set the surface pitch for user-memory surfaces.
2015-02-19 17:51:36 +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
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
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
Stefan Dösinger
3d49060fdf
wined3d: Fix the color keyed P8 alpha ref value.
2015-02-04 23:14:59 +09:00
Matteo Bruni
6bb32e47ff
wined3d: Use the core gl*CompressedTex* functions.
2015-01-20 16:08:54 +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
5231113fc7
wined3d: Replace wined3d_texture_apply_state_changes() with wined3d_texture_apply_sampler_desc().
2015-01-15 17:24:38 +01:00
Henri Verbeet
86e99abb12
wined3d: Store a struct wined3d_sampler_desc in struct gl_texture.
...
Instead of a enum wined3d_texture_state array.
2015-01-15 17:24:35 +01:00
Matteo Bruni
79a0dece8b
wined3d: Use the core version of the gl*Buffer* functions.
2015-01-15 11:44:20 +01:00
Henri Verbeet
ea534c9ab4
wined3d: Allow initial texture contents to be specified with wined3d_texture_create().
2015-01-05 20:15:35 +01:00
Stefan Dösinger
aad1997dff
wined3d: Remove texture locations after downloading all subresources.
2014-10-23 18:48:25 +09:00
Henri Verbeet
1800712298
wined3d: Track texture coordinate normalization per-texture.
2014-10-09 17:36:21 +02:00
Henri Verbeet
c5459881a3
wined3d: Track SFLAG_DYNLOCK per-texture.
2014-10-09 17:36:21 +02:00
Henri Verbeet
d6a511e022
wined3d: Track system memory pinning per-texture.
2014-10-09 17:36:21 +02:00
Henri Verbeet
710694d9ca
wined3d: Track format conversion per-texture.
2014-10-08 13:13:37 +02:00
Henri Verbeet
ee8a5b7dd1
wined3d: Track texture allocation per-texture.
2014-10-08 13:13:37 +02:00
Henri Verbeet
0c0a2adc71
wined3d: Handle GL texture allocation in the texture code.
2014-10-08 13:13:37 +02:00
Henri Verbeet
77646173a0
wined3d: Move the color key conversion helpers to util.c.
2014-10-08 13:13:37 +02:00
Henri Verbeet
bd1afdb3c3
wined3d: Get rid of surface_prepare_texture_internal().
2014-10-07 20:22:07 +02:00
Henri Verbeet
6da1cff518
wined3d: Get rid of d3dfmt_convert_surface().
2014-10-07 20:22:06 +02:00
Henri Verbeet
71b59afe03
wined3d: Return the destination format from d3dfmt_get_conv().
2014-10-07 20:22:05 +02:00
Henri Verbeet
fd342cce3e
wined3d: Don't check for color-keying for WINED3D_CT_P8.
...
We don't support p8 color keying either way.
2014-10-06 17:35:17 +02:00
Henri Verbeet
c5bf229287
wined3d: Print a FIXME for any unhandled format in d3dfmt_get_conv().
2014-10-06 17:35:15 +02:00
Henri Verbeet
dffcc36dd4
wined3d: Don't abuse conv_byte_count for color-key conversions.
2014-10-06 17:35:12 +02:00
Henri Verbeet
b0ce89d810
wined3d: Just use glGammaInternal/rtInternal from the destination format in d3dfmt_get_conv().
...
Using glGammaInternal or rtInternal should do the right thing in principle,
although in practice they should never get used either way.
2014-10-06 17:35:10 +02:00
Henri Verbeet
7d42d9ea91
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8A8.
2014-10-03 09:22:52 +02:00
Henri Verbeet
dabe5b4479
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8X8.
2014-10-03 09:22:49 +02:00
Henri Verbeet
548978dec4
wined3d: Introduce a separate function for WINED3D_CT_CK_B8G8R8.
2014-10-03 09:22:45 +02:00
Henri Verbeet
dabb07aea6
wined3d: Introduce a separate function for WINED3D_CT_CK_B5G5R5X1.
2014-10-02 16:58:27 +02:00
Henri Verbeet
e377ad45fa
wined3d: Introduce a separate function for WINED3D_CT_CK_B5G6R5.
2014-10-02 16:58:25 +02:00
Henri Verbeet
e10a46c300
wined3d: Introduce a separate function for WINED3D_CT_P8.
2014-10-02 16:58:23 +02:00
Henri Verbeet
5802f72adf
wined3d: Just store the wined3d format in color_key_info[].
2014-10-02 16:58:21 +02:00
Henri Verbeet
2c7be38bb4
wined3d: Convert to WINED3DFMT_B8G8R8A8_UNORM for WINED3D_CT_CK_B8G8R8X8.
2014-10-02 16:58:19 +02:00
Henri Verbeet
7579a96ac1
wined3d: Convert to WINED3DFMT_B8G8R8A8_UNORM for WINED3D_CT_CK_B8G8R8.
2014-10-01 10:35:56 +02:00
Henri Verbeet
02b031e61a
wined3d: Convert to WINED3DFMT_B5G5R5A1_UNORM for WINED3D_CT_CK_B5G6R5.
2014-10-01 10:35:54 +02:00
Henri Verbeet
6f8cb77ea9
wined3d: Convert to WINED3DFMT_B8G8R8A8_UNORM for WINED3D_CT_P8.
2014-10-01 10:35:52 +02:00
Henri Verbeet
632d2fca6e
wined3d: Fix the pitch handling in the no-palette WINED3D_CT_P8 case.
2014-10-01 10:35:50 +02:00
Henri Verbeet
c5d917777a
wined3d: Get rid of the WINED3D_CT_NONE case in d3dfmt_convert_surface().
...
This is never used.
2014-10-01 10:35:47 +02:00
Henri Verbeet
90e3312c8c
wined3d: Use a more consistent naming for wined3d_conversion_type elements.
2014-09-30 17:35:56 +02:00
Henri Verbeet
df21c2b346
wined3d: Pass a texture to d3dfmt_get_conv().
2014-09-30 17:35:24 +02:00
Henri Verbeet
6323a26f6c
wined3d: Get rid of the "use_texturing" parameter to d3dfmt_get_conv().
2014-09-30 17:34:55 +02:00
Henri Verbeet
0932567faf
wined3d: Use a lookup table in d3dfmt_get_conv().
2014-09-30 17:34:20 +02:00
Henri Verbeet
a8ab569415
wined3d: Use wined3d_texture_set_color_key() to manipulate the color-key in surface_blt_special().
2014-09-30 10:18:37 +02:00
Henri Verbeet
2d5c8aff3c
wined3d: Get rid of SFLAG_DONOTFREE.
2014-09-29 10:37:37 +02:00
Henri Verbeet
97856bcfee
wined3d: Replace wined3d_surface_update_desc() with wined3d_texture_update_desc().
2014-09-29 10:37:35 +02:00
Henri Verbeet
8aa1137509
wined3d: Use the texture resource in wined3d_surface_depth_fill().
2014-09-19 10:49:29 +02:00