HANDLE *pSharedHandle )
{
struct pipe_resource *info = &This->base.base.info;
+ struct pipe_screen *screen = pParams->device->screen;
+ enum pipe_format pf;
unsigned i;
D3DSURFACE_DESC sfdesc;
HRESULT hr;
if (Usage & D3DUSAGE_AUTOGENMIPMAP)
Levels = 0;
+ pf = d3d9_to_pipe_format(Format);
+ if (pf == PIPE_FORMAT_NONE ||
+ !screen->is_format_supported(screen, pf, PIPE_TEXTURE_CUBE, 0, PIPE_BIND_SAMPLER_VIEW)) {
+ return D3DERR_INVALIDCALL;
+ }
+
info->screen = pParams->device->screen;
info->target = PIPE_TEXTURE_CUBE;
- info->format = d3d9_to_pipe_format(Format);
+ info->format = pf;
info->width0 = EdgeLength;
info->height0 = EdgeLength;
info->depth0 = 1;
struct pipe_screen *screen = pParams->device->screen;
struct pipe_resource *info = &This->base.base.info;
struct pipe_resource *resource;
+ enum pipe_format pf;
unsigned l;
D3DSURFACE_DESC sfdesc;
HRESULT hr;
if (Usage & D3DUSAGE_AUTOGENMIPMAP)
Levels = 0;
+ pf = d3d9_to_pipe_format(Format);
+ if (Format != D3DFMT_NULL && (pf == PIPE_FORMAT_NONE ||
+ !screen->is_format_supported(screen, pf, PIPE_TEXTURE_2D, 0, PIPE_BIND_SAMPLER_VIEW))) {
+ return D3DERR_INVALIDCALL;
+ }
+
info->screen = screen;
info->target = PIPE_TEXTURE_2D;
- info->format = d3d9_to_pipe_format(Format);
+ info->format = pf;
info->width0 = Width;
info->height0 = Height;
info->depth0 = 1;
HANDLE *pSharedHandle )
{
struct pipe_resource *info = &This->base.base.info;
+ struct pipe_screen *screen = pParams->device->screen;
+ enum pipe_format pf;
unsigned l;
D3DVOLUME_DESC voldesc;
HRESULT hr;
if (Usage & D3DUSAGE_AUTOGENMIPMAP)
Levels = 0;
+ pf = d3d9_to_pipe_format(Format);
+ if (pf == PIPE_FORMAT_NONE ||
+ !screen->is_format_supported(screen, pf, PIPE_TEXTURE_3D, 0, PIPE_BIND_SAMPLER_VIEW)) {
+ return D3DERR_INVALIDCALL;
+ }
+
info->screen = pParams->device->screen;
info->target = PIPE_TEXTURE_3D;
- info->format = d3d9_to_pipe_format(Format);
+ info->format = pf;
info->width0 = Width;
info->height0 = Height;
info->depth0 = Depth;