aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/gallium/auxiliary/util/u_blitter.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-10 08:28:58 +0200
committermarha <marha@users.sourceforge.net>2011-10-10 08:28:58 +0200
commitbaf98f9bb36f956245d83ecd04f90625d6d68d2b (patch)
treec4af86b7cdb9c57cc539fa0764050865233e3617 /mesalib/src/gallium/auxiliary/util/u_blitter.h
parent7fae5492e3ef8e5fa15f742be4c2a15b9782e89a (diff)
parentafbd3947071a33f59dda122f1ac396442a02c128 (diff)
downloadvcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.tar.gz
vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.tar.bz2
vcxsrv-baf98f9bb36f956245d83ecd04f90625d6d68d2b.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_blitter.h')
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_blitter.h47
1 files changed, 34 insertions, 13 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_blitter.h b/mesalib/src/gallium/auxiliary/util/u_blitter.h
index a9ad02364..798096e74 100644
--- a/mesalib/src/gallium/auxiliary/util/u_blitter.h
+++ b/mesalib/src/gallium/auxiliary/util/u_blitter.h
@@ -89,7 +89,7 @@ struct blitter_context
void *saved_dsa_state; /**< depth stencil alpha state */
void *saved_velem_state; /**< vertex elements state */
void *saved_rs_state; /**< rasterizer state */
- void *saved_fs, *saved_vs; /**< fragment shader, vertex shader */
+ void *saved_fs, *saved_vs, *saved_gs; /**< shaders */
struct pipe_framebuffer_state saved_fb_state; /**< framebuffer state */
struct pipe_stencil_ref saved_stencil_ref; /**< stencil ref */
@@ -126,24 +126,28 @@ struct pipe_context *util_blitter_get_pipe(struct blitter_context *blitter)
}
/*
- * These states must be saved before any of the following functions is called:
- * - blend state
- * - depth stencil alpha state
- * - rasterizer state
- * - vertex shader
- * - any other shader??? (XXX)
- * - fragment shader
+ * These states must be saved before any of the following functions are called:
* - vertex buffers
* - vertex elements
+ * - vertex shader
+ * - geometry shader (if supported)
+ * - rasterizer state
*/
/**
* Clear a specified set of currently bound buffers to specified values.
+ *
+ * These states must be saved in the blitter in addition to the state objects
+ * already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
*/
void util_blitter_clear(struct blitter_context *blitter,
unsigned width, unsigned height,
unsigned num_cbufs,
unsigned clear_buffers,
+ enum pipe_format cbuf_format,
const union pipe_color_union *color,
double depth, unsigned stencil);
@@ -155,7 +159,7 @@ void util_blitter_clear_depth_custom(struct blitter_context *blitter,
* Copy a block of pixels from one surface to another.
*
* You can copy from any color format to any other color format provided
- * the former can be sampled and the latter can be rendered to. Otherwise,
+ * the former can be sampled from and the latter can be rendered to. Otherwise,
* a software fallback path is taken and both surfaces must be of the same
* format.
*
@@ -163,14 +167,18 @@ void util_blitter_clear_depth_custom(struct blitter_context *blitter,
* cannot be copied unless you set ignore_stencil to FALSE. In that case,
* a software fallback path is taken and both surfaces must be of the same
* format.
+ * XXX implement hw-accel stencil copy using shader stencil export.
*
* Use pipe_screen->is_format_supported to know your options.
*
* These states must be saved in the blitter in addition to the state objects
* already required to be saved:
- * - framebuffer state
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
* - fragment sampler states
* - fragment sampler textures
+ * - framebuffer state
*/
void util_blitter_copy_texture(struct blitter_context *blitter,
struct pipe_resource *dst,
@@ -186,6 +194,9 @@ void util_blitter_copy_texture(struct blitter_context *blitter,
*
* These states must be saved in the blitter in addition to the state objects
* already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
* - framebuffer state
*/
void util_blitter_clear_render_target(struct blitter_context *blitter,
@@ -200,6 +211,9 @@ void util_blitter_clear_render_target(struct blitter_context *blitter,
*
* These states must be saved in the blitter in addition to the state objects
* already required to be saved:
+ * - fragment shader
+ * - depth stencil alpha state
+ * - blend state
* - framebuffer state
*/
void util_blitter_clear_depth_stencil(struct blitter_context *blitter,
@@ -220,7 +234,7 @@ void util_blitter_custom_depth_stencil(struct blitter_context *blitter,
* of the util_blitter_{clear, copy_region, fill_region} functions and then
* forgotten.
*
- * CSOs not listed here are not affected by util_blitter. */
+ * States not listed here are not affected by util_blitter. */
static INLINE
void util_blitter_save_blend(struct blitter_context *blitter,
@@ -272,6 +286,13 @@ void util_blitter_save_vertex_shader(struct blitter_context *blitter,
}
static INLINE
+void util_blitter_save_geometry_shader(struct blitter_context *blitter,
+ void *gs)
+{
+ blitter->saved_gs = gs;
+}
+
+static INLINE
void util_blitter_save_framebuffer(struct blitter_context *blitter,
const struct pipe_framebuffer_state *state)
{
@@ -322,8 +343,8 @@ util_blitter_save_fragment_sampler_views(struct blitter_context *blitter,
static INLINE void
util_blitter_save_vertex_buffers(struct blitter_context *blitter,
- int num_vertex_buffers,
- struct pipe_vertex_buffer *vertex_buffers)
+ int num_vertex_buffers,
+ struct pipe_vertex_buffer *vertex_buffers)
{
assert(num_vertex_buffers <= Elements(blitter->saved_vertex_buffers));