unsigned int ui, i;
unsigned int unNumOfReg;
unsigned int unBit;
+ unsigned int num_sq_ps_gprs;
GLuint exportCount;
GLboolean point_sprite = GL_FALSE;
SETfield(r700->ps.SQ_PGM_RESOURCES_PS.u32All, ui, NUM_GPRS_shift, NUM_GPRS_mask);
+ num_sq_ps_gprs = ((r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All & NUM_PS_GPRS_mask) >> NUM_PS_GPRS_shift);
+
+ if(ui > num_sq_ps_gprs)
+ {
+ /* care! thich changes sq - needs idle state */
+ R600_STATECHANGE(context, sq);
+ SETfield(r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All, ui, NUM_PS_GPRS_shift, NUM_PS_GPRS_mask);
+ }
+
CLEARbit(r700->ps.SQ_PGM_RESOURCES_PS.u32All, UNCACHED_FIRST_INST_bit);
if(fp->r700Shader.uStackSize) /* we don't use branch for now, it should be zero. */
struct gl_program_parameter_list *paramList;
unsigned int unNumParamData;
unsigned int ui;
+ unsigned int num_sq_vs_gprs;
if(GL_FALSE == vp->loaded)
{
SETfield(r700->vs.SQ_PGM_RESOURCES_VS.u32All, vp->r700Shader.nRegs + 1,
NUM_GPRS_shift, NUM_GPRS_mask);
+ num_sq_vs_gprs = ((r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All & NUM_VS_GPRS_mask) >> NUM_VS_GPRS_shift);
+
+ if((vp->r700Shader.nRegs + 1) > num_sq_vs_gprs)
+ {
+ /* care! thich changes sq - needs idle state */
+ R600_STATECHANGE(context, sq);
+ SETfield(r700->sq_config.SQ_GPR_RESOURCE_MGMT_1.u32All, vp->r700Shader.nRegs + 1,
+ NUM_VS_GPRS_shift, NUM_VS_GPRS_mask);
+ }
+
if(vp->r700Shader.uStackSize) /* we don't use branch for now, it should be zero. */
{
SETfield(r700->vs.SQ_PGM_RESOURCES_VS.u32All, vp->r700Shader.uStackSize,