On 28 March 2015 at 17:06, Stefan Dösinger <stefan(a)codeweavers.com> wrote:
@@ -179,7 +179,7 @@ static void surface_get_blt_info(GLenum target, const RECT *rect, GLsizei w, GLs case GL_TEXTURE_2D: info->binding = GL_TEXTURE_BINDING_2D; info->bind_target = GL_TEXTURE_2D; - info->tex_type = tex_2d; + info->tex_type = WINED3D_FFP_TEXTURE_TYPE_2D; coords[0][0] = (float)rect->left / w; coords[0][1] = (float)rect->top / h; coords[0][2] = 0.0f; Note that there isn't anything particularly fixed-function about blits. That currently doesn't matter a whole lot since this is effectively only used for onscreen/offscreen depth blits, but I get the impression your intention is to use this for the blitter interface in general. In that case, something like wined3d_shader_resource_type may be more appropriate, since eventually we'll have to deal with e.g. buffers and array textures as well (for ID3D10Device::CopySubresourceRegion() in particular.)
+enum wined3d_ffp_texture_type { - tex_1d = 0, - tex_2d = 1, - tex_3d = 2, - tex_cube = 3, - tex_rect = 4, - tex_type_count = 5, + WINED3D_FFP_TEXTURE_TYPE_1D = 0, + WINED3D_FFP_TEXTURE_TYPE_2D = 1, + WINED3D_FFP_TEXTURE_TYPE_3D = 2, + WINED3D_FFP_TEXTURE_TYPE_CUBE = 3, + WINED3D_FFP_TEXTURE_TYPE_RECT = 4, + WINED3D_FFP_TEXTURE_TYPE_COUNT = 5, }; Somewhat related to above, if this is supposed to be fixed-function we don't need WINED3D_FFP_TEXTURE_TYPE_1D. If it's supposed to be for blits we do, but the "FFP" in the name would be inappropriate.
-/* Similar to tex_types, except that it doesn't have 1d textures - * (can't be bound), rect textures (handled via np2_fixup) and - * none / unknown (treated as 2d and handled via dummy textures). */ +/* Similar to wined3d_ffp_texture_type, except that it doesn't + * have 1d textures (can't be bound), rect textures (handled via + * np2_fixup) and none / unknown (treated as 2d and handled via + * dummy textures). */ wined3d_ffp_texture_type doesn't have a none/unknown element either.