summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r--src/mesa/drivers/dri/glamo/glamo_cmdq.c7
-rw-r--r--src/mesa/drivers/dri/glamo/glamo_state.c23
2 files changed, 20 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/glamo/glamo_cmdq.c b/src/mesa/drivers/dri/glamo/glamo_cmdq.c
index a8b788ad67..d804a1d376 100644
--- a/src/mesa/drivers/dri/glamo/glamo_cmdq.c
+++ b/src/mesa/drivers/dri/glamo/glamo_cmdq.c
@@ -61,17 +61,14 @@ void glamoDRMAddData(glamoContext *gCtx, uint32_t val, int len)
return;
}
- if ( (len != 2) && (len != 4) ) {
- fprintf(stderr, "Wrong command length!\n");
- return;
- }
-
/* Record command */
if ( len == 2 ) {
gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = val & 0xffff;
} else if ( len == 4 ) {
gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = val & 0x0000ffff;
gCtx->cmdq_drm[gCtx->cmdq_drm_used++] = val & 0xffff0000;
+ } else {
+ fprintf(stderr, "Wrong command length!\n");
}
}
diff --git a/src/mesa/drivers/dri/glamo/glamo_state.c b/src/mesa/drivers/dri/glamo/glamo_state.c
index 407b52c862..d2ef632227 100644
--- a/src/mesa/drivers/dri/glamo/glamo_state.c
+++ b/src/mesa/drivers/dri/glamo/glamo_state.c
@@ -105,7 +105,7 @@ static void glamoClear(GLcontext *ctx, GLbitfield mask)
grb = glamo_renderbuffer(fb->_ColorDrawBuffers[i]);
- glamoDRMStartBurst(gCtx, GLAMO_REG_2D_DST_ADDRL);
+ glamoDRMStartBurst(gCtx, GLAMO_REG_2D_DST_X);
glamoDRMAddData(gCtx, fb->_Xmin, 2);
glamoDRMAddData(gCtx, fb->_Ymin, 2);
glamoDRMAddBO(gCtx, grb->bo);
@@ -115,12 +115,25 @@ static void glamoClear(GLcontext *ctx, GLbitfield mask)
glamoDRMAddData(gCtx, fb->_Ymax-fb->_Ymin, 2);
glamoDRMAddData(gCtx, 0x0000, 2);
glamoDRMAddData(gCtx, 0x0000, 2);
- glamoDRMAddData(gCtx, gCtx->col_clear, 2);
+ glamoDRMAddData(gCtx, gCtx->col_clear, 2); /* FG */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* BG */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Source FG */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Source BG */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Mask1 */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Mask2 */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Mask3 */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Mask4 */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Rot X */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Rot Y */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Left clip */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Top clip */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Right clip */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Bottom clip */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Cmd param 1 */
+ glamoDRMAddData(gCtx, 0xf0 << 8, 2); /* Cmd param 2 */
+ glamoDRMAddData(gCtx, 0x0000, 2); /* Cmd param 3 */
glamoDRMDispatch(gCtx);
- glamoDRMStartBurst(gCtx, GLAMO_REG_2D_COMMAND2);
- glamoDRMAddData(gCtx, 0xf0 << 8, 2);
- glamoDRMDispatch(gCtx);
}
}