radeonsi: Add CIK SDMA support
[mesa.git] / src / gallium / drivers / radeonsi / si_pipe.h
index 1496d5fedd7f516e0e1cb251c2ce8af9fc1b95b0..2d67342f1608dc8aad026766afb5bbbaa3629f18 100644 (file)
  * the number shouldn't be a commonly-used one. */
 #define SI_BASE_VERTEX_UNKNOWN INT_MIN
 #define SI_RESTART_INDEX_UNKNOWN INT_MIN
+#define SI_NUM_SMOOTH_AA_SAMPLES 8
 
 #define SI_TRACE_CS 0
 #define SI_TRACE_CS_DWORDS             6
 
 #define SI_MAX_DRAW_CS_DWORDS \
-       (/*derived prim state:*/ 6 + /*draw regs:*/ 16 + /*draw packets:*/ 31)
+       (/*scratch:*/ 3 + /*derived prim state:*/ 3 + \
+        /*draw regs:*/ 16 + /*draw packets:*/ 31)
 
 /* Instruction cache. */
 #define SI_CONTEXT_INV_ICACHE          (R600_CONTEXT_PRIVATE_FLAG << 0)
@@ -83,7 +85,6 @@ struct si_compute;
 
 struct si_screen {
        struct r600_common_screen       b;
-       LLVMTargetMachineRef            tm;
 };
 
 struct si_sampler_view {
@@ -161,8 +162,6 @@ struct si_context {
 
        struct si_framebuffer           framebuffer;
        struct si_vertex_element        *vertex_elements;
-       unsigned                        pa_sc_line_stipple;
-       unsigned                        pa_su_sc_mode_cntl;
        /* for saving when using blitter */
        struct pipe_stencil_ref         stencil_ref;
        /* shaders */
@@ -185,6 +184,7 @@ struct si_context {
        struct r600_atom                msaa_sample_locs;
        struct r600_atom                msaa_config;
        int                             ps_iter_samples;
+       bool                            smoothing_enabled;
 
        /* Vertex and index buffers. */
        bool                    vertex_buffers_dirty;
@@ -202,6 +202,8 @@ struct si_context {
        struct pipe_resource    *esgs_ring;
        struct pipe_resource    *gsvs_ring;
 
+       LLVMTargetMachineRef            tm;
+
        /* SI state handling */
        union si_state  queued;
        union si_state  emitted;
@@ -226,6 +228,7 @@ struct si_context {
        int                     last_prim;
        int                     last_multi_vgt_param;
        int                     last_rast_prim;
+       unsigned                last_sc_line_stipple;
        int                     current_rast_prim; /* primitive type after TES, GS */
 
        /* Scratch buffer */
@@ -234,6 +237,15 @@ struct si_context {
        unsigned                spi_tmpring_size;
 };
 
+/* cik_sdma.c */
+void cik_sdma_copy(struct pipe_context *ctx,
+                  struct pipe_resource *dst,
+                  unsigned dst_level,
+                  unsigned dstx, unsigned dsty, unsigned dstz,
+                  struct pipe_resource *src,
+                  unsigned src_level,
+                  const struct pipe_box *src_box);
+
 /* si_blit.c */
 void si_init_blit_functions(struct si_context *sctx);
 void si_flush_depth_textures(struct si_context *sctx,