Lines Matching defs:stateBlock

196     IWineD3DVertexDeclarationImpl *declaration = (IWineD3DVertexDeclarationImpl *)This->stateBlock->vertexDecl;
219 if (!This->stateBlock->streamSource[element->input_slot]) continue;
221 stride = This->stateBlock->streamStride[element->input_slot];
222 if (This->stateBlock->streamIsUP)
224 TRACE("Stream %u is UP, %p\n", element->input_slot, This->stateBlock->streamSource[element->input_slot]);
226 data = (BYTE *)This->stateBlock->streamSource[element->input_slot];
230 TRACE("Stream %u isn't UP, %p\n", element->input_slot, This->stateBlock->streamSource[element->input_slot]);
231 data = buffer_get_memory(This->stateBlock->streamSource[element->input_slot], &buffer_object);
238 if (This->stateBlock->loadBaseVertexIndex < 0)
240 WARN("loadBaseVertexIndex is < 0 (%d), not using vbos\n", This->stateBlock->loadBaseVertexIndex);
242 data = buffer_get_sysmem((struct wined3d_buffer *)This->stateBlock->streamSource[element->input_slot]);
243 if ((UINT_PTR)data < -This->stateBlock->loadBaseVertexIndex * stride)
277 stride_used = vshader_get_input(This->stateBlock->vertexShader,
324 if (!This->stateBlock->streamIsUP)
338 buffer = (struct wined3d_buffer *)This->stateBlock->streamSource[element->stream_idx];
430 IWineD3DStateBlockImpl *stateblock = device->stateBlock;
488 IWineD3DStateBlockImpl *stateblock = device->stateBlock;
1638 /* Creating the startup stateBlock - Note Special Case: 0 => Don't fill in yet! */
1641 (IWineD3DStateBlock **)&This->stateBlock,
1647 TRACE("(%p) : Created stateblock (%p)\n", This, This->stateBlock);
1648 This->updateStateBlock = This->stateBlock;
1743 IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *)This->stateBlock);
1807 if(This->stateBlock) {
1808 IWineD3DStateBlock_Release((IWineD3DStateBlock *) This->stateBlock);
1809 This->stateBlock = NULL;
1933 if(This->updateStateBlock != This->stateBlock)
1940 to set this->stateBlock = NULL; first */
1941 IWineD3DStateBlock *stateBlock = (IWineD3DStateBlock *)This->stateBlock;
1942 This->stateBlock = NULL;
1945 if(IWineD3DStateBlock_Release(stateBlock) > 0){
2193 This->stateBlock->streamSource[StreamNumber],
2194 This->stateBlock->streamOffset[StreamNumber],
2195 This->stateBlock->streamStride[StreamNumber]);
2201 *pStream = This->stateBlock->streamSource[StreamNumber];
2202 *pStride = This->stateBlock->streamStride[StreamNumber];
2204 *pOffset = This->stateBlock->streamOffset[StreamNumber];
2282 if (!memcmp(&This->stateBlock->transforms[d3dts].u.m[0][0], lpmatrix, sizeof(WINED3DMATRIX))) {
2286 conv_mat(lpmatrix, &This->stateBlock->transforms[d3dts].u.m[0][0]);
2310 *pMatrix = This->stateBlock->transforms[State];
2501 LIST_FOR_EACH(e, &This->stateBlock->lightMap[Hi])
2613 LIST_FOR_EACH(e, &This->stateBlock->lightMap[Hi])
2680 pPlane[0] = This->stateBlock->clipplane[Index][0];
2681 pPlane[1] = This->stateBlock->clipplane[Index][1];
2682 pPlane[2] = This->stateBlock->clipplane[Index][2];
2683 pPlane[3] = This->stateBlock->clipplane[Index][3];
2791 *ppIndexData = This->stateBlock->pIndexData;
2830 *base_index = This->stateBlock->baseVertexIndex;
2864 *pViewport = This->stateBlock->viewport;
2875 DWORD oldValue = This->stateBlock->renderState[State];
2900 TRACE("(%p) for State %d = %d\n", This, State, This->stateBlock->renderState[State]);
2901 *pValue = This->stateBlock->renderState[State];
2921 if (Sampler >= sizeof(This->stateBlock->samplerState)/sizeof(This->stateBlock->samplerState[0])) {
2940 oldValue = This->stateBlock->samplerState[Sampler][Type];
2970 if (Sampler >= sizeof(This->stateBlock->samplerState)/sizeof(This->stateBlock->samplerState[0])) {
2974 *Value = This->stateBlock->samplerState[Sampler][Type];
3038 *ppDecl = This->stateBlock->vertexDecl;
3076 *ppShader = This->stateBlock->vertexShader;
3133 memcpy(dstData, &This->stateBlock->vertexShaderConstantB[start], cnt * sizeof(BOOL));
3187 memcpy(dstData, &This->stateBlock->vertexShaderConstantI[start * 4], cnt * sizeof(int) * 4);
3247 memcpy(dstData, &This->stateBlock->vertexShaderConstantF[start * 4], cnt * sizeof(float) * 4);
3282 WINED3DTEXTUREOP color_op = This->stateBlock->textureState[i][WINED3DTSS_COLOROP];
3283 WINED3DTEXTUREOP alpha_op = This->stateBlock->textureState[i][WINED3DTSS_ALPHAOP];
3284 DWORD color_arg1 = This->stateBlock->textureState[i][WINED3DTSS_COLORARG1] & WINED3DTA_SELECTMASK;
3285 DWORD color_arg2 = This->stateBlock->textureState[i][WINED3DTSS_COLORARG2] & WINED3DTA_SELECTMASK;
3286 DWORD color_arg3 = This->stateBlock->textureState[i][WINED3DTSS_COLORARG0] & WINED3DTA_SELECTMASK;
3287 DWORD alpha_arg1 = This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG1] & WINED3DTA_SELECTMASK;
3288 DWORD alpha_arg2 = This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG2] & WINED3DTA_SELECTMASK;
3289 DWORD alpha_arg3 = This->stateBlock->textureState[i][WINED3DTSS_ALPHAARG0] & WINED3DTA_SELECTMASK;
3320 || This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures)
3354 ((IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader)->baseShader.reg_maps.sampler_type;
3397 ((IWineD3DVertexShaderImpl *)This->stateBlock->vertexShader)->baseShader.reg_maps.sampler_type;
3403 IWineD3DPixelShaderImpl *pshader = (IWineD3DPixelShaderImpl *)This->stateBlock->pixelShader;
3439 BOOL vs = use_vs(This->stateBlock);
3440 BOOL ps = use_ps(This->stateBlock);
3494 *ppShader = This->stateBlock->pixelShader;
3551 memcpy(dstData, &This->stateBlock->pixelShaderConstantB[start], cnt * sizeof(BOOL));
3605 memcpy(dstData, &This->stateBlock->pixelShaderConstantI[start * 4], cnt * sizeof(int) * 4);
3665 memcpy(dstData, &This->stateBlock->pixelShaderConstantF[start * 4], cnt * sizeof(float) * 4);
3730 if(This->stateBlock->renderState[WINED3DRS_CLIPPING]) {
4023 BOOL vbo = FALSE, streamWasUP = This->stateBlock->streamIsUP;
4038 This->stateBlock->streamIsUP = FALSE;
4040 This->stateBlock->streamIsUP = streamWasUP;
4058 struct wined3d_buffer *vb = (struct wined3d_buffer *)This->stateBlock->streamSource[e->stream_idx];
4110 if(Stage > This->stateBlock->lowest_disabled_stage &&
4127 for(i = Stage + 1; i < This->stateBlock->lowest_disabled_stage; i++) {
4131 This->stateBlock->lowest_disabled_stage = Stage;
4149 This->stateBlock->lowest_disabled_stage = i;
4182 if (stage >= sizeof(This->stateBlock->textures) / sizeof(*This->stateBlock->textures))
4294 if (Stage >= sizeof(This->stateBlock->textures)/sizeof(This->stateBlock->textures[0])) {
4299 *ppTexture=This->stateBlock->textures[Stage];
4414 This->updateStateBlock = This->stateBlock;
4510 IWineD3DStateBlockImpl *stateblock = This->stateBlock;
4617 if(This->stateBlock->renderState[WINED3DRS_SCISSORTESTENABLE]) {
4618 IntersectRect(&vp_rect, &vp_rect, &This->stateBlock->scissorRect);
4636 if(This->stateBlock->renderState[WINED3DRS_SCISSORTESTENABLE]) {
4637 IntersectRect((RECT *) &curRect, (RECT *) &curRect, &This->stateBlock->scissorRect);
4728 *primitive_type = d3d_primitive_type_from_gl(This->stateBlock->gl_primitive_type);
4739 if(!This->stateBlock->vertexDecl) {
4745 if(This->stateBlock->streamIsUP) {
4747 This->stateBlock->streamIsUP = FALSE;
4750 if(This->stateBlock->loadBaseVertexIndex != 0) {
4751 This->stateBlock->loadBaseVertexIndex = 0;
4766 pIB = This->stateBlock->pIndexData;
4776 if(!This->stateBlock->vertexDecl) {
4781 if(This->stateBlock->streamIsUP) {
4783 This->stateBlock->streamIsUP = FALSE;
4789 if (This->stateBlock->IndexFmt == WINED3DFMT_R16_UINT) {
4795 if(This->stateBlock->loadBaseVertexIndex != This->stateBlock->baseVertexIndex) {
4796 This->stateBlock->loadBaseVertexIndex = This->stateBlock->baseVertexIndex;
4815 if(!This->stateBlock->vertexDecl) {
4821 vb = This->stateBlock->streamSource[0];
4822 This->stateBlock->streamSource[0] = (IWineD3DBuffer *)pVertexStreamZeroData;
4824 This->stateBlock->streamOffset[0] = 0;
4825 This->stateBlock->streamStride[0] = VertexStreamZeroStride;
4826 This->stateBlock->streamIsUP = TRUE;
4827 This->stateBlock->loadBaseVertexIndex = 0;
4835 This->stateBlock->streamStride[0] = 0;
4836 This->stateBlock->streamSource[0] = NULL;
4856 if(!This->stateBlock->vertexDecl) {
4868 vb = This->stateBlock->streamSource[0];
4869 This->stateBlock->streamSource[0] = (IWineD3DBuffer *)pVertexStreamZeroData;
4871 This->stateBlock->streamIsUP = TRUE;
4872 This->stateBlock->streamOffset[0] = 0;
4873 This->stateBlock->streamStride[0] = VertexStreamZeroStride;
4876 This->stateBlock->baseVertexIndex = 0;
4877 This->stateBlock->loadBaseVertexIndex = 0;
4885 This->stateBlock->streamSource[0] = NULL;
4886 This->stateBlock->streamStride[0] = 0;
4887 ib = This->stateBlock->pIndexData;
4890 This->stateBlock->pIndexData = NULL;
4910 This->stateBlock->baseVertexIndex = 0;
4930 This->stateBlock->streamIsUP = TRUE;
4931 This->stateBlock->baseVertexIndex = 0;
5267 if(This->stateBlock->samplerState[i][WINED3DSAMP_MINFILTER] == WINED3DTEXF_NONE) {
5271 if(This->stateBlock->samplerState[i][WINED3DSAMP_MAGFILTER] == WINED3DTEXF_NONE) {
5276 texture = (IWineD3DBaseTextureImpl *) This->stateBlock->textures[i];
5279 if(This->stateBlock->samplerState[i][WINED3DSAMP_MAGFILTER] != WINED3DTEXF_POINT) {
5283 if(This->stateBlock->samplerState[i][WINED3DSAMP_MINFILTER] != WINED3DTEXF_POINT) {
5287 if(This->stateBlock->samplerState[i][WINED3DSAMP_MIPFILTER] != WINED3DTEXF_NONE &&
5288 This->stateBlock->samplerState[i][WINED3DSAMP_MIPFILTER] != WINED3DTEXF_POINT /* sic! */) {
5307 IWineD3DBaseTextureImpl *texture = (IWineD3DBaseTextureImpl*)device->stateBlock->textures[i];
5700 old_primitive_type = This->stateBlock->gl_primitive_type;
5701 This->stateBlock->gl_primitive_type = GL_TRIANGLES;
5703 This->stateBlock->gl_primitive_type = old_primitive_type;
6221 This->stateBlock->viewport.Height = ((IWineD3DSurfaceImpl *)This->render_targets[0])->currentDesc.Height;
6222 This->stateBlock->viewport.Width = ((IWineD3DSurfaceImpl *)This->render_targets[0])->currentDesc.Width;
6223 This->stateBlock->viewport.X = 0;
6224 This->stateBlock->viewport.Y = 0;
6225 This->stateBlock->viewport.MaxZ = 1.0f;
6226 This->stateBlock->viewport.MinZ = 0.0f;
6229 This->stateBlock->scissorRect.top = 0;
6230 This->stateBlock->scissorRect.left = 0;
6231 This->stateBlock->scissorRect.right = This->stateBlock->viewport.Width;
6232 This->stateBlock->scissorRect.bottom = This->stateBlock->viewport.Height;
6827 IWineD3DStateBlock_Release((IWineD3DStateBlock *)This->stateBlock);
6928 hr = IWineD3DDevice_CreateStateBlock(iface, WINED3DSBT_INIT, (IWineD3DStateBlock **)&This->stateBlock, NULL);
6930 else TRACE("Created stateblock %p\n", This->stateBlock);
6931 This->updateStateBlock = This->stateBlock;
6934 hr = IWineD3DStateBlock_InitStartupStateBlock((IWineD3DStateBlock *) This->stateBlock);
7074 if (This->stateBlock != NULL && This->stateBlock->textures[counter] == (IWineD3DBaseTexture *)resource) {
7076 This->stateBlock->textures[counter] = NULL;
7078 if (This->updateStateBlock != This->stateBlock ){
7105 if (This->stateBlock != NULL ) { /* only happens if there is an error in the application, or on reset/release (because we don't manage internal tracking properly) */
7106 if ((IWineD3DResource *)This->stateBlock->streamSource[streamNumber] == resource) {
7108 This->stateBlock->streamSource[streamNumber] = 0;
7118 if (This->stateBlock != NULL ) { /* ==NULL when device is being destroyed */
7119 if (This->stateBlock->pIndexData == (IWineD3DBuffer *)resource) {
7120 This->stateBlock->pIndexData = NULL;