radeonsi: remove R600_CONTEXT_* flags
[mesa.git] / src / gallium / drivers / radeonsi / si_state_streamout.c
index 35fbceabd685dabb4cc31a96573df67bc7e1026f..3e83243e954913ecf0cfd03c8558ab7022383890 100644 (file)
@@ -19,9 +19,6 @@
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  * SOFTWARE.
- *
- * Authors: Marek Olšák <maraeo@gmail.com>
- *
  */
 
 #include "si_pipe.h"
@@ -155,7 +152,7 @@ static void si_set_streamout_targets(struct pipe_context *ctx,
                if (!targets[i])
                        continue;
 
-               r600_context_add_resource_size(ctx, targets[i]->buffer);
+               si_context_add_resource_size(ctx, targets[i]->buffer);
                enabled_mask |= 1 << i;
 
                if (offsets[i] == ((unsigned)-1))
@@ -253,8 +250,8 @@ static void si_flush_vgt_streamout(struct si_context *sctx)
        radeon_emit(cs, WAIT_REG_MEM_EQUAL); /* wait until the register is equal to the reference value */
        radeon_emit(cs, reg_strmout_cntl >> 2);  /* register */
        radeon_emit(cs, 0);
-       radeon_emit(cs, S_008490_OFFSET_UPDATE_DONE(1)); /* reference value */
-       radeon_emit(cs, S_008490_OFFSET_UPDATE_DONE(1)); /* mask */
+       radeon_emit(cs, S_0084FC_OFFSET_UPDATE_DONE(1)); /* reference value */
+       radeon_emit(cs, S_0084FC_OFFSET_UPDATE_DONE(1)); /* mask */
        radeon_emit(cs, 4); /* poll interval */
 }
 
@@ -295,8 +292,10 @@ static void si_emit_streamout_begin(struct r600_common_context *rctx, struct r60
                        radeon_emit(cs, va); /* src address lo */
                        radeon_emit(cs, va >> 32); /* src address hi */
 
-                       r600_emit_reloc(&sctx->b,  &sctx->b.gfx, t[i]->buf_filled_size,
-                                       RADEON_USAGE_READ, RADEON_PRIO_SO_FILLED_SIZE);
+                       radeon_add_to_buffer_list(&sctx->b,  &sctx->b.gfx,
+                                                 t[i]->buf_filled_size,
+                                                 RADEON_USAGE_READ,
+                                                 RADEON_PRIO_SO_FILLED_SIZE);
                } else {
                        /* Start from the beginning. */
                        radeon_emit(cs, PKT3(PKT3_STRMOUT_BUFFER_UPDATE, 4, 0));
@@ -335,8 +334,10 @@ void si_emit_streamout_end(struct si_context *sctx)
                radeon_emit(cs, 0); /* unused */
                radeon_emit(cs, 0); /* unused */
 
-               r600_emit_reloc(&sctx->b,  &sctx->b.gfx, t[i]->buf_filled_size,
-                               RADEON_USAGE_WRITE, RADEON_PRIO_SO_FILLED_SIZE);
+               radeon_add_to_buffer_list(&sctx->b,  &sctx->b.gfx,
+                                         t[i]->buf_filled_size,
+                                         RADEON_USAGE_WRITE,
+                                         RADEON_PRIO_SO_FILLED_SIZE);
 
                /* Zero the buffer size. The counters (primitives generated,
                 * primitives emitted) may be enabled even if there is not
@@ -348,7 +349,6 @@ void si_emit_streamout_end(struct si_context *sctx)
        }
 
        sctx->streamout.begin_emitted = false;
-       sctx->b.flags |= R600_CONTEXT_STREAMOUT_FLUSH;
 }
 
 /* STREAMOUT CONFIG DERIVED STATE