surface->texture_target = GL_TEXTURE_2D;
/* Non-power2 support */
- if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT])
+ if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] || gl_info->supported[WINED3D_GL_NORMALIZED_TEXRECT]
+ || gl_info->supported[ARB_TEXTURE_RECTANGLE])
{
pow2Width = surface->resource.width;
pow2Height = surface->resource.height;
if (pow2Width > surface->resource.width || pow2Height > surface->resource.height)
{
/* TODO: Add support for non power two compressed textures. */
- if (surface->resource.format->flags & WINED3DFMT_FLAG_COMPRESSED)
+ if (surface->resource.format->flags & (WINED3DFMT_FLAG_COMPRESSED | WINED3DFMT_FLAG_HEIGHT_SCALE))
{
- FIXME("(%p) Compressed non-power-two textures are not supported w(%d) h(%d)\n",
+ FIXME("(%p) Compressed or height scaled non-power-two textures are not supported w(%d) h(%d)\n",
surface, surface->resource.width, surface->resource.height);
return WINED3DERR_NOTAVAILABLE;
}
HRESULT hr;
DWORD valid_location = 0;
- TRACE("surface %p, width %u, height %u, format %s, multisample_type %#x, multisample_quality %u.\n",
- surface, width, height, debug_d3dformat(format_id), multisample_type, multisample_type);
+ TRACE("surface %p, width %u, height %u, format %s, multisample_type %#x, multisample_quality %u, "
+ "mem %p, pitch %u.\n",
+ surface, width, height, debug_d3dformat(format_id), multisample_type, multisample_type, mem, pitch);
if (!resource_size)
return WINED3DERR_INVALIDCALL;
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL)
{
- if (location == WINED3D_LOCATION_TEXTURE_RGB && surface->locations & WINED3D_LOCATION_DRAWABLE)
+ if (location == WINED3D_LOCATION_TEXTURE_RGB
+ && surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
{
struct wined3d_context *context = context_acquire(device, NULL);
surface_load_ds_location(surface, context, location);