Skip to contentSkip to conversation

exa/nv10: use same clip settings as mesa driver

PATCH New Ilia Mirkin 1 participant 4 messages Aug 10, 2014 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 exa/nv10: use same clip settings as mesa driver

The higher 0x800 was getting overwritten by the 0x7ff anyways, so it wasn't doing any good. The mesa driver just uses 0x800 for the low portion and doesn't set the 8 bit in the higher portion, so do the same thing here.

---
 src/nv10_exa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
src/nv10_exa.c +2 -2
index cb9eb7c..df2f561 100644
@@ -686,9 +686,9 @@ NVAccelInitNV10TCL(ScrnInfoPtr pScrn)
 	PUSH_DATA (push, 0);
 
 	BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_HORIZ(0)), 1);
-	PUSH_DATA (push, 0x7ff << 16 | 0x800800);
+	PUSH_DATA (push, 0x7ff << 16 | 0x800);
 	BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_VERT(0)), 1);
-	PUSH_DATA (push, 0x7ff << 16 | 0x800800);
+	PUSH_DATA (push, 0x7ff << 16 | 0x800);
 
 	for (i = 1; i < 8; i++) {
 		BEGIN_NV04(push, NV10_3D(VIEWPORT_CLIP_HORIZ(i)), 1);
Signature · 1 line
1.8.5.5

A message that is not in the archive (sent off-list or not yet received): 1407651915-7500-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]

#2 lore raw

PATCH 2/4 exa/nv10: use color 0 when the pict format has no RGB component

---
 src/nv10_exa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/nv10_exa.c +1 -1
index df2f561..47cf0ef 100644
@@ -520,7 +520,7 @@ setup_picture(NVPtr pNv, PicturePtr pict, PixmapPtr pixmap, int unit,
 	if (pict && PICT_FORMAT_RGB(pict->format))
 		*color = RCSEL_COLOR | source;
 	else
-		*color = RCSEL_ALPHA | RCINP_ZERO;
+		*color = RCSEL_COLOR | RCINP_ZERO;
 
 	if (pict && PICT_FORMAT_A(pict->format))
 		*alpha = RCSEL_ALPHA | source;
Signature · 1 line
1.8.5.5
#3 lore raw

PATCH 3/4 exa/nv10: fix blend function setup to check the correct mask

In reply to a message not in the archive
---
 src/nv10_exa.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
src/nv10_exa.c +3 -3
index 47cf0ef..6b75a9e 100644
@@ -461,7 +461,7 @@ setup_render_target(NVPtr pNv, PicturePtr pict, PixmapPtr pixmap)
 }
 
 static void
-setup_blend_function(NVPtr pNv, PicturePtr pdpict, int alu)
+setup_blend_function(NVPtr pNv, PicturePtr pdpict, PicturePtr pmpict, int alu)
 {
 	struct nouveau_pushbuf *push = pNv->pushbuf;
 	struct pict_op *op = &nv10_pict_op[alu];
@@ -476,7 +476,7 @@ setup_blend_function(NVPtr pNv, PicturePtr pdpict, int alu)
 		 */
 		src_factor = SF(ZERO);
 
-	if (effective_component_alpha(pNv->pmpict)) {
+	if (effective_component_alpha(pmpict)) {
 		if (dst_factor == DF(SRC_ALPHA))
 			dst_factor = DF(SRC_COLOR);
 		else if (dst_factor == DF(ONE_MINUS_SRC_ALPHA))
@@ -557,7 +557,7 @@ NV10EXAPrepareComposite(int op,
 	/* setup render target and blending */
 	if (!setup_render_target(pNv, pict_dst, dst))
 		return FALSE;
-	setup_blend_function(pNv, pict_dst, op);
+	setup_blend_function(pNv, pict_dst, pict_mask, op);
 
 	/* select picture sources */
 	if (!setup_picture(pNv, pict_src, src, 0, &sc, &sa))
Signature · 1 line
1.8.5.5
#4 lore raw

PATCH 4/4 exa/nv10: src ops should use the SF macro

In reply to a message not in the archive

Doesn't actually end up mattering.

---
 src/nv10_exa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/nv10_exa.c +1 -1
index 6b75a9e..78bc739 100644
@@ -132,7 +132,7 @@ needs_src_alpha(int op)
 static inline Bool
 needs_src(int op)
 {
-	return nv10_pict_op[op].src != DF(ZERO);
+	return nv10_pict_op[op].src != SF(ZERO);
 }
 
 static inline Bool
Signature · 1 line
1.8.5.5