if (This->may_swvp)
This->caps.MaxVertexShaderConst = NINE_MAX_CONST_F_SWVP;
+ This->pure = !!(This->params.BehaviorFlags & D3DCREATE_PUREDEVICE);
+
This->context.pipe = This->screen->context_create(This->screen, NULL, 0);
This->pipe_secondary = This->screen->context_create(This->screen, NULL, 0);
if (!This->context.pipe || !This->pipe_secondary) { return E_OUTOFMEMORY; } /* guess */
D3DTRANSFORMSTATETYPE State,
D3DMATRIX *pMatrix )
{
- D3DMATRIX *M = nine_state_access_transform(&This->state.ff, State, FALSE);
+ D3DMATRIX *M;
+
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
+ M = nine_state_access_transform(&This->state.ff, State, FALSE);
user_assert(M, D3DERR_INVALIDCALL);
*pMatrix = *M;
return D3D_OK;
NineDevice9_GetMaterial( struct NineDevice9 *This,
D3DMATERIAL9 *pMaterial )
{
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(pMaterial, E_POINTER);
*pMaterial = This->state.ff.material;
return D3D_OK;
{
const struct nine_state *state = &This->state;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(pLight, D3DERR_INVALIDCALL);
user_assert(Index < state->ff.num_lights, D3DERR_INVALIDCALL);
user_assert(state->ff.light[Index].Type < NINED3DLIGHT_INVALID,
const struct nine_state *state = &This->state;
unsigned i;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(Index < state->ff.num_lights, D3DERR_INVALIDCALL);
user_assert(state->ff.light[Index].Type < NINED3DLIGHT_INVALID,
D3DERR_INVALIDCALL);
{
const struct nine_state *state = &This->state;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(Index < PIPE_MAX_CLIP_PLANES, D3DERR_INVALIDCALL);
memcpy(pPlane, &state->clip.ucp[Index][0], sizeof(state->clip.ucp[0]));
D3DRENDERSTATETYPE State,
DWORD *pValue )
{
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(State < D3DRS_COUNT, D3DERR_INVALIDCALL);
*pValue = This->state.rs_advertised[State];
{
const struct nine_state *state = &This->state;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(Stage < ARRAY_SIZE(state->ff.tex_stage), D3DERR_INVALIDCALL);
user_assert(Type < ARRAY_SIZE(state->ff.tex_stage[0]), D3DERR_INVALIDCALL);
D3DSAMPLERSTATETYPE Type,
DWORD *pValue )
{
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(Sampler < NINE_MAX_SAMPLERS_PS ||
Sampler == D3DDMAPSAMPLER ||
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
{
const struct nine_state *state = &This->state;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(StartRegister < This->caps.MaxVertexShaderConst, D3DERR_INVALIDCALL);
user_assert(StartRegister + Vector4fCount <= This->caps.MaxVertexShaderConst, D3DERR_INVALIDCALL);
user_assert(pConstantData, D3DERR_INVALIDCALL);
const struct nine_state *state = &This->state;
int i;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(StartRegister < (This->may_swvp ? NINE_MAX_CONST_I_SWVP : NINE_MAX_CONST_I),
D3DERR_INVALIDCALL);
user_assert(StartRegister + Vector4iCount <= (This->may_swvp ? NINE_MAX_CONST_I_SWVP : NINE_MAX_CONST_I),
const struct nine_state *state = &This->state;
int i;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(StartRegister < (This->may_swvp ? NINE_MAX_CONST_B_SWVP : NINE_MAX_CONST_B),
D3DERR_INVALIDCALL);
user_assert(StartRegister + BoolCount <= (This->may_swvp ? NINE_MAX_CONST_B_SWVP : NINE_MAX_CONST_B),
{
const struct nine_state *state = &This->state;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(StartRegister < NINE_MAX_CONST_F_PS3, D3DERR_INVALIDCALL);
user_assert(StartRegister + Vector4fCount <= NINE_MAX_CONST_F_PS3, D3DERR_INVALIDCALL);
user_assert(pConstantData, D3DERR_INVALIDCALL);
const struct nine_state *state = &This->state;
int i;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(StartRegister < NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
user_assert(StartRegister + Vector4iCount <= NINE_MAX_CONST_I, D3DERR_INVALIDCALL);
user_assert(pConstantData, D3DERR_INVALIDCALL);
const struct nine_state *state = &This->state;
int i;
+ user_assert(!This->pure, D3DERR_INVALIDCALL);
user_assert(StartRegister < NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
user_assert(StartRegister + BoolCount <= NINE_MAX_CONST_B, D3DERR_INVALIDCALL);
user_assert(pConstantData, D3DERR_INVALIDCALL);