summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2013-11-05 19:48:00 +0000
committerChristian Gmeiner <christian.gmeiner@gmail.com>2013-11-05 19:48:00 +0000
commitecb5fdfbe603221d2e5d05261be8ede9bc878b17 (patch)
tree8b19b791c40e5fee975fb71f72432a4fc88f79fd /src
parented3b4a7c605d0b1e4c5f6e6f8625af0a406b4ce2 (diff)
rs: update RS_WINDOW_SIZE for two pixel pipes
on a vivante gpu with only one pixel pipe the following gets used: 0x08010588, /* LOAD_STATE (1) Base: 0x01620 Size: 1 Fixp: 0 */ 0x010001c0, /* [01620] RS.WINDOW_SIZE := HEIGHT=256,WIDTH=448 */ with two pixel pipes the following gets used: 0x008001c0, /* [01620] RS.WINDOW_SIZE := HEIGHT=128,WIDTH=448 */ 0x080205c0, /* LOAD_STATE (1) Base: 0x01700 Size: 2 Fixp: 0 */ 0x00000000, /* [01700] RS.PIPE[0].OFFSET := X=0,Y=0 */ 0x00800000, /* [01704] RS.PIPE[1].OFFSET := X=0,Y=128 */ 0x00000000, /* PAD */
Diffstat (limited to 'src')
-rw-r--r--src/etnaviv/etna_rs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/etnaviv/etna_rs.c b/src/etnaviv/etna_rs.c
index 2bfbb98..392840c 100644
--- a/src/etnaviv/etna_rs.c
+++ b/src/etnaviv/etna_rs.c
@@ -119,6 +119,12 @@ void etna_submit_rs_state(struct etna_ctx *restrict ctx, const struct compiled_r
}
else if (ctx->conn->chip.pixel_pipes == 2)
{
+ /* we need to change window size value */
+ uint32_t window_size = cs->RS_WINDOW_SIZE;
+ uint32_t h = (window_size & VIVS_RS_WINDOW_SIZE_HEIGHT__MASK) >> VIVS_RS_WINDOW_SIZE_HEIGHT__SHIFT;
+ uint32_t w = (window_size & VIVS_RS_WINDOW_SIZE_WIDTH__MASK) >> VIVS_RS_WINDOW_SIZE_WIDTH__SHIFT;
+ window_size = VIVS_RS_WINDOW_SIZE_WIDTH(w) | VIVS_RS_WINDOW_SIZE_HEIGHT(h / 2);
+
etna_reserve(ctx, 32);
/*0 */ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_CONFIG>>2, 5, 0);
/*1 */ ETNA_EMIT(ctx, cs->RS_CONFIG);
@@ -137,7 +143,7 @@ void etna_submit_rs_state(struct etna_ctx *restrict ctx, const struct compiled_r
/*14*/ ETNA_EMIT(ctx, cs->RS_PIPE_OFFSET[1]);
/*15*/ ETNA_EMIT(ctx, 0x00000000); /* pad */
/*16*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_WINDOW_SIZE>>2, 1, 0);
- /*17*/ ETNA_EMIT(ctx, cs->RS_WINDOW_SIZE);
+ /*17*/ ETNA_EMIT(ctx, window_size);
/*18*/ ETNA_EMIT_LOAD_STATE(ctx, VIVS_RS_DITHER(0)>>2, 2, 0);
/*19*/ ETNA_EMIT(ctx, cs->RS_DITHER[0]);
/*20*/ ETNA_EMIT(ctx, cs->RS_DITHER[1]);