/* Whether the blitter is running. */
bool running;
+ bool use_index_buffer;
+
/* Private members, really. */
struct pipe_context *pipe; /**< pipe context */
struct pipe_query *saved_render_cond_query;
uint saved_render_cond_mode;
bool saved_render_cond_cond;
+
+ boolean saved_window_rectangles_include;
+ unsigned saved_num_window_rectangles;
+ struct pipe_scissor_state saved_window_rectangles[PIPE_MAX_WINDOW_RECTANGLES];
};
/**
void *custom_blend,
enum pipe_format format);
+/* Used by vc4 for 8/16-bit linear-to-tiled blits */
+void util_blitter_custom_shader(struct blitter_context *blitter,
+ struct pipe_surface *dstsurf,
+ void *custom_vs, void *custom_fs);
+
/* The functions below should be used to save currently bound constant state
* objects inside a driver. The objects are automatically restored at the end
* of the util_blitter_{clear, copy_region, fill_region} functions and then
blitter->saved_render_cond_cond = condition;
}
+static inline void
+util_blitter_save_window_rectangles(struct blitter_context *blitter,
+ boolean include,
+ unsigned num_rectangles,
+ const struct pipe_scissor_state *rects)
+{
+ blitter->saved_window_rectangles_include = include;
+ blitter->saved_num_window_rectangles = num_rectangles;
+ if (num_rectangles > 0) {
+ assert(num_rectangles < ARRAY_SIZE(blitter->saved_window_rectangles));
+ memcpy(blitter->saved_window_rectangles, rects,
+ sizeof(*rects) * num_rectangles);
+ }
+}
+
void util_blitter_common_clear_setup(struct blitter_context *blitter,
unsigned width, unsigned height,
unsigned clear_buffers,