summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.inc4
-rw-r--r--src/driver/etna_pipe.c10
2 files changed, 9 insertions, 5 deletions
diff --git a/src/Makefile.inc b/src/Makefile.inc
index 951beea..5f0d1ed 100644
--- a/src/Makefile.inc
+++ b/src/Makefile.inc
@@ -10,7 +10,9 @@ LD = $(GCCPREFIX)ld
AR = $(GCCPREFIX)ar
GCC_CFLAGS = -D_POSIX_C_SOURCE=200809 -D_GNU_SOURCE
-COMMON_FLAGS = -O2 -g3 -ggdb3 -Wall -Wmissing-prototypes -DGCABI_${GCABI} $(GCC_CFLAGS) -I$(TOP)/lib -I$(TOP)/include_$(GCABI) -fPIC \
+COMMON_FLAGS = -O2 -g3 -ggdb3 -Wall -Wmissing-prototypes \
+ -DGCABI_${GCABI} $(GCC_CFLAGS) -I$(TOP)/lib -I$(TOP)/include_$(GCABI) \
+ -fPIC -pthread \
-I$(TOP)/minigallium/include -I$(TOP)/minigallium/auxiliary -I$(TOP) \
-fdiagnostics-show-option \
-Werror=missing-prototypes -Werror=missing-declarations -Werror=implicit-function-declaration \
diff --git a/src/driver/etna_pipe.c b/src/driver/etna_pipe.c
index 216b86f..cd377c0 100644
--- a/src/driver/etna_pipe.c
+++ b/src/driver/etna_pipe.c
@@ -979,9 +979,10 @@ static void etna_pipe_set_framebuffer_state(struct pipe_context *pipe,
}
struct etna_resource *res = etna_resource(cbuf->base.texture);
+ struct etna_bo *bo = res->bo;
if (priv->ctx->conn->chip.pixel_pipes == 1)
{
- cs->PE_COLOR_ADDR = res->pipe_addr[0];
+ cs->PE_COLOR_ADDR = etna_bo_gpu_address(bo) + cbuf->surf.offset;
}
else if (priv->ctx->conn->chip.pixel_pipes == 2)
{
@@ -995,7 +996,7 @@ static void etna_pipe_set_framebuffer_state(struct pipe_context *pipe,
ts_mem_config |= VIVS_TS_MEM_CONFIG_COLOR_FAST_CLEAR;
cs->TS_COLOR_CLEAR_VALUE = cbuf->level->clear_value;
cs->TS_COLOR_STATUS_BASE = etna_bo_gpu_address(ts_bo) + cbuf->surf.ts_offset;
- cs->TS_COLOR_SURFACE_BASE = res->pipe_addr[0];
+ cs->TS_COLOR_SURFACE_BASE = etna_bo_gpu_address(bo) + cbuf->surf.offset;
}
/* MSAA */
if(cbuf->base.texture->nr_samples > 1)
@@ -1021,9 +1022,10 @@ static void etna_pipe_set_framebuffer_state(struct pipe_context *pipe,
/* VIVS_PE_DEPTH_CONFIG_ONLY_DEPTH */
/* merged with depth_stencil_alpha */
struct etna_resource *res = etna_resource(zsbuf->base.texture);
+ struct etna_bo *bo = res->bo;
if (priv->ctx->conn->chip.pixel_pipes == 1)
{
- cs->PE_DEPTH_ADDR = res->pipe_addr[0];
+ cs->PE_DEPTH_ADDR = etna_bo_gpu_address(bo) + zsbuf->surf.offset;
}
else if (priv->ctx->conn->chip.pixel_pipes == 2)
{
@@ -1039,7 +1041,7 @@ static void etna_pipe_set_framebuffer_state(struct pipe_context *pipe,
ts_mem_config |= VIVS_TS_MEM_CONFIG_DEPTH_FAST_CLEAR;
cs->TS_DEPTH_CLEAR_VALUE = zsbuf->level->clear_value;
cs->TS_DEPTH_STATUS_BASE = etna_bo_gpu_address(ts_bo) + zsbuf->surf.ts_offset;
- cs->TS_DEPTH_SURFACE_BASE = res->pipe_addr[0];
+ cs->TS_DEPTH_SURFACE_BASE = etna_bo_gpu_address(bo) + zsbuf->surf.offset;
}
ts_mem_config |= (depth_bits == 16 ? VIVS_TS_MEM_CONFIG_DEPTH_16BPP : 0);
/* MSAA */