summaryrefslogtreecommitdiff
path: root/src/i965_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-07 20:42:24 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-12-07 20:43:22 +0000
commit27e33928f87ecb806d1f8c459d4a4ada76b0e30e (patch)
tree282e94c0e9c9d5846899ab622d7524a70df22c84 /src/i965_render.c
parent03e8351179b1c25d219842ef3e01ee8e176f594f (diff)
i965: Mark sure we mark reused render targets as dirty
... or else we may forget to flush them again. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i965_render.c')
-rw-r--r--src/i965_render.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/i965_render.c b/src/i965_render.c
index 3141394d..ebaa10ed 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1123,9 +1123,19 @@ i965_set_picture_surface_state(intel_screen_private *intel,
{
struct intel_pixmap *priv = intel_get_pixmap_private(pixmap);
struct brw_surface_state *ss;
+ uint32_t write_domain, read_domains;
int offset;
if (is_dst) {
+ write_domain = I915_GEM_DOMAIN_RENDER;
+ read_domains = I915_GEM_DOMAIN_RENDER;
+ } else {
+ write_domain = 0;
+ read_domains = I915_GEM_DOMAIN_SAMPLER;
+ }
+ intel_batch_mark_pixmap_domains(intel, priv,
+ read_domains, write_domain);
+ if (is_dst) {
if (priv->dst_bound)
return priv->dst_bound;
} else {
@@ -1159,25 +1169,12 @@ i965_set_picture_surface_state(intel_screen_private *intel,
ss->ss3.tile_walk = 0; /* Tiled X */
ss->ss3.tiled_surface = intel_pixmap_tiled(pixmap) ? 1 : 0;
- if (priv->bo != NULL) {
- uint32_t write_domain, read_domains;
-
- if (is_dst) {
- write_domain = I915_GEM_DOMAIN_RENDER;
- read_domains = I915_GEM_DOMAIN_RENDER;
- } else {
- write_domain = 0;
- read_domains = I915_GEM_DOMAIN_SAMPLER;
- }
-
- intel_batch_mark_pixmap_domains(intel, priv, read_domains, write_domain);
- dri_bo_emit_reloc(intel->surface_bo,
- read_domains, write_domain,
- 0,
- intel->surface_used +
- offsetof(struct brw_surface_state, ss1),
- priv->bo);
- }
+ dri_bo_emit_reloc(intel->surface_bo,
+ read_domains, write_domain,
+ 0,
+ intel->surface_used +
+ offsetof(struct brw_surface_state, ss1),
+ priv->bo);
offset = intel->surface_used;
intel->surface_used += sizeof(struct brw_surface_state_padded);