diff options
author | Roland Scheidegger <[email protected]> | 2010-04-26 19:50:57 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2010-04-26 19:51:25 +0200 |
commit | aac2cccccfd701ae8d7ce0813c28c64498d4a076 (patch) | |
tree | 31cbcdddf4263d086f376798a710eb2cb4e9ad5b /src/gallium/include/pipe/p_screen.h | |
parent | 06574e45b418dab1ec106773c92b7d9e5af45c81 (diff) |
gallium: interface changes for multisampling
add function to set sample mask, and state for alpha-to-coverage and
alpha-to-one. Also make it possible to query for supported sample count
with is_msaa_supported().
Use explicit resource_resolve() to resolve a resource. Note that it is illegal
to bind a unresolved resource as a sampler view, must be resolved first (as per
d3d10 and OGL APIs, binding unresolved resource would mean that special texture
fetch functions need to be used which give explicit control over what samples
to fetch, which isn't supported yet).
Also change surface_fill() and surface_copy() to operate directly on resources.
Blits should operate directly on resources, most often state trackers just used
get_tex_surface() then did a blit. Note this also means the blit bind flags are
gone, if a driver implements this functionality it is expected to handle it for
all resources having depth_stencil/render_target/sampler_view bind flags (might
even require it for all bind flags?).
Might want to introduce quality levels for MSAA later.
Might need to revisit this for hw which does instant resolve.
Diffstat (limited to 'src/gallium/include/pipe/p_screen.h')
-rw-r--r-- | src/gallium/include/pipe/p_screen.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/include/pipe/p_screen.h b/src/gallium/include/pipe/p_screen.h index beff1ae8a92..1bad045b162 100644 --- a/src/gallium/include/pipe/p_screen.h +++ b/src/gallium/include/pipe/p_screen.h @@ -99,10 +99,19 @@ struct pipe_screen { boolean (*is_format_supported)( struct pipe_screen *, enum pipe_format format, enum pipe_texture_target target, - unsigned bindings, + unsigned bindings, unsigned geom_flags ); /** + * Check if the given pipe_format is supported with a requested + * number of samples for msaa. + * \param sample_count number of samples for multisampling + */ + boolean (*is_msaa_supported)( struct pipe_screen *, + enum pipe_format format, + unsigned sample_count ); + + /** * Create a new texture object, using the given template info. */ struct pipe_resource * (*resource_create)(struct pipe_screen *, |