mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 04:58:05 +02:00
Restore vp input mapping, fix vtx stream missing problem.
This commit is contained in:
parent
11606e873d
commit
00a216fd1e
2 changed files with 12 additions and 15 deletions
|
|
@ -386,7 +386,7 @@ int r700SetupStreams(GLcontext * ctx)
|
||||||
|
|
||||||
/* currently aos are packed */
|
/* currently aos are packed */
|
||||||
r700SetupVTXConstants(ctx,
|
r700SetupVTXConstants(ctx,
|
||||||
j,
|
i,
|
||||||
(void*)(&context->radeon.tcl.aos[j]),
|
(void*)(&context->radeon.tcl.aos[j]),
|
||||||
(unsigned int)context->radeon.tcl.aos[j].components,
|
(unsigned int)context->radeon.tcl.aos[j].components,
|
||||||
(unsigned int)context->radeon.tcl.aos[j].stride * 4,
|
(unsigned int)context->radeon.tcl.aos[j].stride * 4,
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ unsigned int Map_Vertex_Input(r700_AssemblerBase *pAsm,
|
||||||
struct gl_vertex_program *mesa_vp,
|
struct gl_vertex_program *mesa_vp,
|
||||||
unsigned int unStart)
|
unsigned int unStart)
|
||||||
{
|
{
|
||||||
int i, j = 0;
|
int i;
|
||||||
unsigned int unBit;
|
unsigned int unBit;
|
||||||
unsigned int unTotal = unStart;
|
unsigned int unTotal = unStart;
|
||||||
for(i=0; i<VERT_ATTRIB_MAX; i++)
|
for(i=0; i<VERT_ATTRIB_MAX; i++)
|
||||||
|
|
@ -123,8 +123,7 @@ unsigned int Map_Vertex_Input(r700_AssemblerBase *pAsm,
|
||||||
unBit = 1 << i;
|
unBit = 1 << i;
|
||||||
if(mesa_vp->Base.InputsRead & unBit)
|
if(mesa_vp->Base.InputsRead & unBit)
|
||||||
{
|
{
|
||||||
pAsm->ucVP_AttributeMap[j] = unTotal++;
|
pAsm->ucVP_AttributeMap[i] = unTotal++;
|
||||||
j++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (unTotal - unStart);
|
return (unTotal - unStart);
|
||||||
|
|
@ -134,7 +133,7 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions(
|
||||||
struct r700_vertex_program *vp,
|
struct r700_vertex_program *vp,
|
||||||
struct gl_vertex_program *mesa_vp)
|
struct gl_vertex_program *mesa_vp)
|
||||||
{
|
{
|
||||||
int i, j = 0;
|
int i;
|
||||||
unsigned int unBit;
|
unsigned int unBit;
|
||||||
VTX_FETCH_METHOD vtxFetchMethod;
|
VTX_FETCH_METHOD vtxFetchMethod;
|
||||||
vtxFetchMethod.bEnableMini = GL_FALSE;
|
vtxFetchMethod.bEnableMini = GL_FALSE;
|
||||||
|
|
@ -146,12 +145,11 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions(
|
||||||
if(mesa_vp->Base.InputsRead & unBit)
|
if(mesa_vp->Base.InputsRead & unBit)
|
||||||
{
|
{
|
||||||
assemble_vfetch_instruction(&vp->r700AsmCode,
|
assemble_vfetch_instruction(&vp->r700AsmCode,
|
||||||
j,
|
i,
|
||||||
vp->r700AsmCode.ucVP_AttributeMap[j],
|
vp->r700AsmCode.ucVP_AttributeMap[i],
|
||||||
vp->aos_desc[j].size,
|
vp->aos_desc[i].size,
|
||||||
vp->aos_desc[j].type,
|
vp->aos_desc[i].type,
|
||||||
&vtxFetchMethod);
|
&vtxFetchMethod);
|
||||||
j++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,16 +305,15 @@ void r700SelectVertexShader(GLcontext *ctx)
|
||||||
struct vertex_buffer *vb = &tnl->vb;
|
struct vertex_buffer *vb = &tnl->vb;
|
||||||
|
|
||||||
unsigned int unBit;
|
unsigned int unBit;
|
||||||
unsigned int i, j = 0;
|
unsigned int i;
|
||||||
for(i=0; i<VERT_ATTRIB_MAX; i++)
|
for(i=0; i<VERT_ATTRIB_MAX; i++)
|
||||||
{
|
{
|
||||||
unBit = 1 << i;
|
unBit = 1 << i;
|
||||||
if(vpc->mesa_program.Base.InputsRead & unBit) /* ctx->Array.ArrayObj->xxxxxxx */
|
if(vpc->mesa_program.Base.InputsRead & unBit) /* ctx->Array.ArrayObj->xxxxxxx */
|
||||||
{
|
{
|
||||||
vpc->aos_desc[j].size = vb->AttribPtr[i]->size;
|
vpc->aos_desc[i].size = vb->AttribPtr[i]->size;
|
||||||
vpc->aos_desc[j].stride = vb->AttribPtr[i]->size * sizeof(GL_FLOAT);/* when emit array, data is packed. vb->AttribPtr[i]->stride;*/
|
vpc->aos_desc[i].stride = vb->AttribPtr[i]->size * sizeof(GL_FLOAT);/* when emit array, data is packed. vb->AttribPtr[i]->stride;*/
|
||||||
vpc->aos_desc[j].type = GL_FLOAT;
|
vpc->aos_desc[i].type = GL_FLOAT;
|
||||||
j++;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue