Format, Pool, pSharedHandle);
user_assert(EdgeLength, D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
- user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
- (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
+ /* user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL); */
user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */
+ user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
+ (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
+
if (Usage & D3DUSAGE_AUTOGENMIPMAP)
Levels = 0;
d3dformat_to_string(Format), nine_D3DPOOL_to_str(Pool), pSharedHandle);
user_assert(Width && Height, D3DERR_INVALIDCALL);
+
+ /* pSharedHandle: can be non-null for ex only.
+ * D3DPOOL_SYSTEMMEM: Levels must be 1
+ * D3DPOOL_DEFAULT: no restriction for Levels
+ * Other Pools are forbidden. */
user_assert(!pSharedHandle || pParams->device->ex, D3DERR_INVALIDCALL);
- /* When is used shared handle, Pool must be
- * SYSTEMMEM with Levels 1 or DEFAULT with any Levels */
- user_assert(!pSharedHandle || Pool != D3DPOOL_SYSTEMMEM || Levels == 1,
- D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || Pool == D3DPOOL_SYSTEMMEM || Pool == D3DPOOL_DEFAULT,
- D3DERR_INVALIDCALL);
- user_assert((Usage != D3DUSAGE_AUTOGENMIPMAP || Levels <= 1), D3DERR_INVALIDCALL);
+ user_assert(!pSharedHandle ||
+ (Pool == D3DPOOL_SYSTEMMEM && Levels == 1) ||
+ Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
+
user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP) ||
- (Pool != D3DPOOL_SYSTEMMEM && Levels <= 1), D3DERR_INVALIDCALL);
+ (Pool != D3DPOOL_SYSTEMMEM && Pool != D3DPOOL_SCRATCH && Levels <= 1),
+ D3DERR_INVALIDCALL);
- /* TODO: implement buffer sharing (should work with cross process too)
+ /* TODO: implement pSharedHandle for D3DPOOL_DEFAULT (cross process
+ * buffer sharing).
*
* Gem names may have fit but they're depreciated and won't work on render-nodes.
* One solution is to use shm buffers. We would use a /dev/shm file, fill the first
* invalid handle, that we would fail to import. Please note that we don't advertise
* the flag indicating the support for that feature, but apps seem to not care.
*/
- user_assert(!pSharedHandle ||
- Pool == D3DPOOL_SYSTEMMEM ||
- Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
if (pSharedHandle && Pool == D3DPOOL_DEFAULT) {
if (!*pSharedHandle) {
Usage, Format, Pool, pSharedHandle);
user_assert(Width && Height && Depth, D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL);
+
+ /* user_assert(!pSharedHandle || Pool == D3DPOOL_DEFAULT, D3DERR_INVALIDCALL); */
+ user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */
+
/* An IDirect3DVolume9 cannot be bound as a render target can it ? */
user_assert(!(Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL)),
D3DERR_INVALIDCALL);
user_assert(!(Usage & D3DUSAGE_AUTOGENMIPMAP), D3DERR_INVALIDCALL);
- user_assert(!pSharedHandle, D3DERR_INVALIDCALL); /* TODO */
-
pf = d3d9_to_pipe_format_checked(screen, Format, PIPE_TEXTURE_3D, 0,
PIPE_BIND_SAMPLER_VIEW, FALSE);
if (pf == PIPE_FORMAT_NONE)