freedreno: wire up core pipe_debug_callback
[mesa.git] / src / gallium / drivers / radeon / r600_pipe_common.h
index ad41028e32bfed888e34650c5abd504acea72d53..74eefbb8fc51aad9f840f506d79cb002ccf1047b 100644 (file)
 #define DBG_NO_RB_PLUS         (1llu << 45)
 #define DBG_SI_SCHED           (1llu << 46)
 #define DBG_MONOLITHIC_SHADERS (1llu << 47)
+#define DBG_NO_CE              (1llu << 48)
 
 #define R600_MAP_BUFFER_ALIGNMENT 64
 #define R600_MAX_VIEWPORTS        16
 
+enum r600_coherency {
+       R600_COHERENCY_NONE, /* no cache flushes needed */
+       R600_COHERENCY_SHADER,
+       R600_COHERENCY_CB_META,
+};
+
+#ifdef PIPE_ARCH_BIG_ENDIAN
+#define R600_BIG_ENDIAN 1
+#else
+#define R600_BIG_ENDIAN 0
+#endif
+
 struct r600_common_context;
 struct r600_perfcounters;
 struct tgsi_shader_info;
@@ -306,6 +319,9 @@ struct r600_common_screen {
        bool                            has_cp_dma;
        bool                            has_streamout;
 
+       /* Texture filter settings. */
+       int                             force_aniso; /* -1 = disabled */
+
        /* Auxiliary context. Mainly used to initialize resources.
         * It must be locked prior to using and flushed before unlocking. */
        struct pipe_context             *aux_context;
@@ -452,6 +468,7 @@ struct r600_common_context {
        struct r600_viewports           viewports;
        bool                            scissor_enabled;
        bool                            vs_writes_viewport_index;
+       bool                            vs_disables_clipping_viewport;
 
        /* Additional context states. */
        unsigned flags; /* flush flags */
@@ -502,7 +519,7 @@ struct r600_common_context {
 
        void (*clear_buffer)(struct pipe_context *ctx, struct pipe_resource *dst,
                             uint64_t offset, uint64_t size, unsigned value,
-                            bool is_framebuffer);
+                            enum r600_coherency coher);
 
        void (*blit_decompress_depth)(struct pipe_context *ctx,
                                      struct r600_texture *texture,
@@ -538,8 +555,7 @@ void *r600_buffer_map_sync_with_rings(struct r600_common_context *ctx,
                                       unsigned usage);
 bool r600_init_resource(struct r600_common_screen *rscreen,
                        struct r600_resource *res,
-                       uint64_t size, unsigned alignment,
-                       bool use_reusable_pool);
+                       uint64_t size, unsigned alignment);
 struct pipe_resource *r600_buffer_create(struct pipe_screen *screen,
                                         const struct pipe_resource *templ,
                                         unsigned alignment);
@@ -574,7 +590,7 @@ bool r600_can_dump_shader(struct r600_common_screen *rscreen,
                          unsigned processor);
 void r600_screen_clear_buffer(struct r600_common_screen *rscreen, struct pipe_resource *dst,
                              uint64_t offset, uint64_t size, unsigned value,
-                             bool is_framebuffer);
+                             enum r600_coherency coher);
 struct pipe_resource *r600_resource_create_common(struct pipe_screen *screen,
                                                  const struct pipe_resource *templ);
 const char *r600_get_llvm_processor_name(enum radeon_family family);
@@ -624,7 +640,7 @@ struct pipe_surface *r600_create_surface_custom(struct pipe_context *pipe,
                                                struct pipe_resource *texture,
                                                const struct pipe_surface *templ,
                                                unsigned width, unsigned height);
-unsigned r600_translate_colorswap(enum pipe_format format);
+unsigned r600_translate_colorswap(enum pipe_format format, bool do_endian_swap);
 void evergreen_do_fast_color_clear(struct r600_common_context *rctx,
                                   struct pipe_framebuffer_state *fb,
                                   struct r600_atom *fb_state,
@@ -636,6 +652,8 @@ void r600_init_screen_texture_functions(struct r600_common_screen *rscreen);
 void r600_init_context_texture_functions(struct r600_common_context *rctx);
 
 /* r600_viewport.c */
+void evergreen_apply_scissor_bug_workaround(struct r600_common_context *rctx,
+                                           struct pipe_scissor_state *scissor);
 void r600_set_scissor_enable(struct r600_common_context *rctx, bool enable);
 void r600_update_vs_writes_viewport_index(struct r600_common_context *rctx,
                                          struct tgsi_shader_info *info);