r600g: don't double count dirty block

This avoid to overcount the number of dwords we need and
thus avoid maximazation of cs buffer use.

Signed-off-by: Jerome Glisse <jglisse@redhat.com
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index 7106bb6..125fb4f 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -118,9 +118,9 @@
 	block->reg[id] |= value;
 	if (!(block->status & R600_BLOCK_STATUS_DIRTY)) {
 		ctx->pm4_dirty_cdwords += block->pm4_ndwords;
+		block->status |= R600_BLOCK_STATUS_ENABLED;
+		block->status |= R600_BLOCK_STATUS_DIRTY;
 	}
-	block->status |= R600_BLOCK_STATUS_ENABLED;
-	block->status |= R600_BLOCK_STATUS_DIRTY;
 }
 
 static inline void r600_context_block_emit_dirty(struct r600_context *ctx, struct r600_block *block)