Lines Matching defs:cid
561 uint32_t cid;
578 SSMFIELD_ENTRY( VMSVGA3DSHADER, cid),
958 static int vmsvga3dContextDefineOgl(PVGASTATE pThis, uint32_t cid, uint32_t fFlags);
2820 for (uint32_t cid = 0; cid < pState->cContexts; cid++)
2822 pContext = pState->papContexts[cid];
2823 if (pContext->id == cid)
2839 uint32_t cid = pSurface->idAssociatedContext;
2840 if ( cid <= pState->cContexts
2841 && pState->papContexts[cid]->id == cid)
2843 pContext = pState->papContexts[cid];
2850 for (cid = 0; cid < pState->cContexts; cid++)
2852 if (pState->papContexts[cid]->id == cid)
2854 pContext = pState->papContexts[cid];
3174 uint32_t cid;
3192 cid = SVGA3D_INVALID_ID;
3196 Log(("vmsvga3dSurfaceStretchBlt: src sid=%x cid=%x (%d,%d)(%d,%d) dest sid=%x cid=%x (%d,%d)(%d,%d) mode=%x\n",
3201 cid = pSurfaceDest->idAssociatedContext;
3202 if (cid == SVGA3D_INVALID_ID)
3203 cid = pSurfaceSrc->idAssociatedContext;
3205 if ( cid >= pState->cContexts
3206 || pState->papContexts[cid]->id != cid)
3211 pContext = pState->papContexts[cid];
3219 rc = vmsvga3dCreateTexture(pState, pContext, cid, pSurfaceSrc);
3227 rc = vmsvga3dCreateTexture(pState, pContext, cid, pSurfaceDest);
3484 uint32_t cid = pSurface->idAssociatedContext;
3485 if ( cid >= pState->cContexts
3486 || pState->papContexts[cid]->id != cid)
3488 Log(("vmsvga3dSurfaceDMA invalid context id (%x - %x)!\n", cid, (cid >= pState->cContexts) ? -1 : pState->papContexts[cid]->id));
3491 PVMSVGA3DCONTEXT pContext = pState->papContexts[cid];
3812 uint32_t cid;
3831 cid = SVGA3D_INVALID_ID;
3836 cid = pSurface->idAssociatedContext;
3838 if ( cid >= pState->cContexts
3839 || pState->papContexts[cid]->id != cid)
3844 pContext = pState->papContexts[cid];
3852 rc = vmsvga3dCreateTexture(pState, pContext, cid, pSurface);
3885 uint32_t cid;
3909 cid = SVGA3D_INVALID_ID;
3914 cid = pSurface->idAssociatedContext;
3915 Log(("vmsvga3dCommandPresent: sid=%x cRects=%d cid=%x\n", sid, cRects, cid));
3921 if ( cid >= pState->cContexts
3922 || pState->papContexts[cid]->id != cid)
3927 pContext = pState->papContexts[cid];
3987 vmsvga3dShaderSet(pThis, cid, SVGA3D_SHADERTYPE_VS, SVGA_ID_INVALID);
3988 vmsvga3dShaderSet(pThis, cid, SVGA3D_SHADERTYPE_PS, SVGA_ID_INVALID);
4091 vmsvga3dShaderSet(pThis, cid, SVGA3D_SHADERTYPE_VS, oldVShader);
4092 vmsvga3dShaderSet(pThis, cid, SVGA3D_SHADERTYPE_PS, oldPShader);
4210 * @param cid Context id
4213 static int vmsvga3dContextDefineOgl(PVGASTATE pThis, uint32_t cid, uint32_t fFlags)
4221 AssertReturn( cid < SVGA3D_MAX_CONTEXT_IDS
4222 || (cid == VMSVGA3D_SHARED_CTX_ID && (fFlags & VMSVGA3D_DEF_CTX_F_SHARED_CTX)), VERR_INVALID_PARAMETER);
4224 AssertReturn(cid < SVGA3D_MAX_CONTEXT_IDS, VERR_INVALID_PARAMETER);
4230 Log(("vmsvga3dContextDefine id %x\n", cid));
4241 if (cid == VMSVGA3D_SHARED_CTX_ID)
4246 if (cid >= pState->cContexts)
4249 uint32_t cNew = RT_ALIGN(cid + 15, 16);
4262 if (pState->papContexts[cid]->id != SVGA3D_INVALID_ID)
4263 vmsvga3dContextDestroy(pThis, cid);
4265 pContext = pState->papContexts[cid];
4288 && i != cid
4294 Log(("Sharing display lists between cid=%d and cid=%d\n", pContext->id, i));
4304 pContext->id = cid;
4330 RTStrPrintf((char *)cs.lpszName, 256, "Context %d OpenGL Window", cid);
4498 * @param cid Context id
4500 int vmsvga3dContextDefine(PVGASTATE pThis, uint32_t cid)
4502 return vmsvga3dContextDefineOgl(pThis, cid, 0/*fFlags*/);
4511 * @param cid Context id
4513 int vmsvga3dContextDestroy(PVGASTATE pThis, uint32_t cid)
4518 AssertReturn(cid < SVGA3D_MAX_CONTEXT_IDS, VERR_INVALID_PARAMETER);
4520 if ( cid < pState->cContexts
4521 && pState->papContexts[cid]->id == cid)
4523 PVMSVGA3DCONTEXT pContext = pState->papContexts[cid];
4525 Log(("vmsvga3dContextDestroy id %x\n", cid));
4533 vmsvga3dShaderDestroy(pThis, pContext->paPixelShader[i].cid, pContext->paPixelShader[i].id, pContext->paPixelShader[i].type);
4542 vmsvga3dShaderDestroy(pThis, pContext->paVertexShader[i].cid, pContext->paVertexShader[i].id, pContext->paVertexShader[i].type);
4563 if ( pSurface->idAssociatedContext == cid
4658 uint32_t cid = pContext->id;
4660 if (cid != SVGA3D_INVALID_ID)
4686 int vmsvga3dSetTransform(PVGASTATE pThis, uint32_t cid, SVGA3dTransformType type, float matrix[16])
4693 Log(("vmsvga3dSetTransform cid=%x %s\n", cid, vmsvgaTransformToString(type)));
4695 if ( cid >= pState->cContexts
4696 || pState->papContexts[cid]->id != cid)
4701 pContext = pState->papContexts[cid];
4780 vmsvga3dSetClipPlane(pThis, cid, j, pContext->state.aClipPlane[j].plane);
4787 vmsvga3dSetLightData(pThis, cid, j, &pContext->state.aLightData[j].data);
4794 int vmsvga3dSetZRange(PVGASTATE pThis, uint32_t cid, SVGA3dZRange zRange)
4800 Log(("vmsvga3dSetZRange cid=%x min=%d max=%d\n", cid, (uint32_t)(zRange.min * 100.0), (uint32_t)(zRange.max * 100.0)));
4802 if ( cid >= pState->cContexts
4803 || pState->papContexts[cid]->id != cid)
4808 pContext = pState->papContexts[cid];
4935 int vmsvga3dSetRenderState(PVGASTATE pThis, uint32_t cid, uint32_t cRenderStates, SVGA3dRenderState *pRenderState)
4942 Log(("vmsvga3dSetRenderState cid=%x cRenderStates=%d\n", cid, cRenderStates));
4944 if ( cid >= pState->cContexts
4945 || pState->papContexts[cid]->id != cid)
4950 pContext = pState->papContexts[cid];
4956 Log(("vmsvga3dSetRenderState: cid=%x state=%s (%d) val=%x\n", cid, vmsvga3dGetRenderStateName(pRenderState[i].state), pRenderState[i].state, pRenderState[i].uintValue));
5231 int rc = vmsvga3dSetRenderState(pThis, cid, 2, renderstate);
5766 int vmsvga3dSetRenderTarget(PVGASTATE pThis, uint32_t cid, SVGA3dRenderTargetType type, SVGA3dSurfaceImageId target)
5777 Log(("vmsvga3dSetRenderTarget cid=%x type=%x surface id=%x\n", cid, type, target.sid));
5779 if ( cid >= pState->cContexts
5780 || pState->papContexts[cid]->id != cid)
5785 pContext = pState->papContexts[cid];
5852 pContext = pState->papContexts[cid];
5855 LogFlow(("vmsvga3dSetRenderTarget: sid=%x idAssociatedContext %#x -> %#x\n", pRenderTarget->id, pRenderTarget->idAssociatedContext, cid));
5856 pRenderTarget->idAssociatedContext = cid;
5867 Assert(pRenderTarget->idAssociatedContext == cid);
5893 int rc = vmsvga3dCreateTexture(pState, pContext, cid, pRenderTarget);
6092 int vmsvga3dSetTextureState(PVGASTATE pThis, uint32_t cid, uint32_t cTextureStates, SVGA3dTextureState *pTextureState)
6100 Log(("vmsvga3dSetTextureState %x cTextureState=%d\n", cid, cTextureStates));
6102 if ( cid >= pState->cContexts
6103 || pState->papContexts[cid]->id != cid)
6108 pContext = pState->papContexts[cid];
6116 Log(("vmsvga3dSetTextureState: cid=%x stage=%d type=%s (%x) val=%x\n", cid, pTextureState[i].stage, vmsvga3dTextureStateToString(pTextureState[i].name), pTextureState[i].name, pTextureState[i].value));
6210 int rc = vmsvga3dCreateTexture(pState, pContext, cid, pSurface);
6348 int vmsvga3dSetMaterial(PVGASTATE pThis, uint32_t cid, SVGA3dFace face, SVGA3dMaterial *pMaterial)
6355 Log(("vmsvga3dSetMaterial cid=%x face %d\n", cid, face));
6357 if ( cid >= pState->cContexts
6358 || pState->papContexts[cid]->id != cid)
6363 pContext = pState->papContexts[cid];
6401 int vmsvga3dSetLightData(PVGASTATE pThis, uint32_t cid, uint32_t index, SVGA3dLightData *pData)
6408 Log(("vmsvga3dSetLightData cid=%x index=%d type=%d\n", cid, index, pData->type));
6410 if ( cid >= pState->cContexts
6411 || pState->papContexts[cid]->id != cid)
6416 pContext = pState->papContexts[cid];
6581 int vmsvga3dSetLightEnabled(PVGASTATE pThis, uint32_t cid, uint32_t index, uint32_t enabled)
6587 Log(("vmsvga3dSetLightEnabled cid=%x %d -> %d\n", cid, index, enabled));
6589 if ( cid >= pState->cContexts
6590 || pState->papContexts[cid]->id != cid)
6595 pContext = pState->papContexts[cid];
6608 vmsvga3dSetLightData(pThis, cid, index, (SVGA3dLightData *)&vmsvga3d_default_light);
6618 int vmsvga3dSetViewPort(PVGASTATE pThis, uint32_t cid, SVGA3dRect *pRect)
6624 Log(("vmsvga3dSetViewPort cid=%x (%d,%d)(%d,%d)\n", cid, pRect->x, pRect->y, pRect->w, pRect->h));
6626 if ( cid >= pState->cContexts
6627 || pState->papContexts[cid]->id != cid)
6632 pContext = pState->papContexts[cid];
6646 vmsvga3dSetTransform(pThis, cid, SVGA3D_TRANSFORM_PROJECTION, pContext->state.aTransformState[SVGA3D_TRANSFORM_PROJECTION].matrix);
6658 vmsvga3dSetTransform(pThis, cid, SVGA3D_TRANSFORM_PROJECTION, matrix);
6664 int vmsvga3dSetClipPlane(PVGASTATE pThis, uint32_t cid, uint32_t index, float plane[4])
6671 Log(("vmsvga3dSetClipPlane cid=%x %d (%d,%d)(%d,%d)\n", cid, index, (unsigned)(plane[0] * 100.0), (unsigned)(plane[1] * 100.0), (unsigned)(plane[2] * 100.0), (unsigned)(plane[3] * 100.0)));
6674 if ( cid >= pState->cContexts
6675 || pState->papContexts[cid]->id != cid)
6680 pContext = pState->papContexts[cid];
6699 int vmsvga3dSetScissorRect(PVGASTATE pThis, uint32_t cid, SVGA3dRect *pRect)
6705 Log(("vmsvga3dSetScissorRect cid=%x (%d,%d)(%d,%d)\n", cid, pRect->x, pRect->y, pRect->w, pRect->h));
6707 if ( cid >= pState->cContexts
6708 || pState->papContexts[cid]->id != cid)
6713 pContext = pState->papContexts[cid];
6735 int vmsvga3dCommandClear(PVGASTATE pThis, uint32_t cid, SVGA3dClearFlag clearFlag, uint32_t color, float depth, uint32_t stencil,
6744 Log(("vmsvga3dCommandClear cid=%x clearFlag=%x color=%x depth=%d stencil=%x cRects=%d\n", cid, clearFlag, color, (uint32_t)(depth * 100.0), stencil, cRects));
6746 if ( cid >= pState->cContexts
6747 || pState->papContexts[cid]->id != cid)
6752 pContext = pState->papContexts[cid];
7180 int vmsvga3dDrawPrimitives(PVGASTATE pThis, uint32_t cid, uint32_t numVertexDecls, SVGA3dVertexDecl *pVertexDecl, uint32_t numRanges, SVGA3dPrimitiveRange *pRange, uint32_t cVertexDivisor, SVGA3dVertexDivisor *pVertexDivisor)
7188 Log(("vmsvga3dDrawPrimitives cid=%x numVertexDecls=%d numRanges=%d, cVertexDivisor=%d\n", cid, numVertexDecls, numRanges, cVertexDivisor));
7196 if ( cid >= pState->cContexts
7197 || pState->papContexts[cid]->id != cid)
7202 pContext = pState->papContexts[cid];
7302 pContext = pState->papContexts[cid];
7428 int vmsvga3dShaderDefine(PVGASTATE pThis, uint32_t cid, uint32_t shid, SVGA3dShaderType type, uint32_t cbData, uint32_t *pShaderData)
7436 Log(("vmsvga3dShaderDefine cid=%x shid=%x type=%s cbData=%x\n", cid, shid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL", cbData));
7439 if ( cid >= pState->cContexts
7440 || pState->papContexts[cid]->id != cid)
7445 pContext = pState->papContexts[cid];
7463 vmsvga3dShaderDestroy(pThis, cid, shid, pContext->paVertexShader[shid].type);
7482 vmsvga3dShaderDestroy(pThis, cid, shid, pContext->paPixelShader[shid].type);
7489 pShader->cid = cid;
7529 int vmsvga3dShaderDestroy(PVGASTATE pThis, uint32_t cid, uint32_t shid, SVGA3dShaderType type)
7537 Log(("vmsvga3dShaderDestroy cid=%x shid=%x type=%s\n", cid, shid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL"));
7539 if ( cid >= pState->cContexts
7540 || pState->papContexts[cid]->id != cid)
7545 pContext = pState->papContexts[cid];
7583 int vmsvga3dShaderSet(PVGASTATE pThis, uint32_t cid, SVGA3dShaderType type, uint32_t shid)
7590 Log(("vmsvga3dShaderSet cid=%x type=%s shid=%d\n", cid, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL", shid));
7592 if ( cid >= pState->cContexts
7593 || pState->papContexts[cid]->id != cid)
7598 pContext = pState->papContexts[cid];
7656 int vmsvga3dShaderSetConst(PVGASTATE pThis, uint32_t cid, uint32_t reg, SVGA3dShaderType type, SVGA3dShaderConstType ctype, uint32_t cRegisters, uint32_t *pValues)
7663 Log(("vmsvga3dShaderSetConst cid=%x reg=%x type=%s cregs=%d ctype=%x\n", cid, reg, (type == SVGA3D_SHADERTYPE_VS) ? "VERTEX" : "PIXEL", cRegisters, ctype));
7665 if ( cid >= pState->cContexts
7666 || pState->papContexts[cid]->id != cid)
7671 pContext = pState->papContexts[cid];
7750 int vmsvga3dQueryBegin(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type)
7756 int vmsvga3dQueryEnd(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult)
7762 int vmsvga3dQueryWait(PVGASTATE pThis, uint32_t cid, SVGA3dQueryType type, SVGAGuestPtr guestResult)