From 0d29fb017bce0968240ae875af4b3702c2cd46ef Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Sat, 24 Mar 2012 13:34:45 +0000 Subject: [PATCH] gallium: rename DUAL_SOURCE_BLEND cap to MAX_DUAL_SOURCE_RENDER_TARGETS Though I don't think we'll ever expose > 1. Signed-off-by: Dave Airlie --- src/gallium/docs/source/screen.rst | 2 +- src/gallium/drivers/r300/r300_screen.c | 2 +- src/gallium/drivers/r600/r600_pipe.c | 4 +++- src/gallium/drivers/softpipe/sp_screen.c | 2 ++ src/gallium/include/pipe/p_defines.h | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gallium/docs/source/screen.rst b/src/gallium/docs/source/screen.rst index 51d94649c2f..751eda3284a 100644 --- a/src/gallium/docs/source/screen.rst +++ b/src/gallium/docs/source/screen.rst @@ -26,7 +26,7 @@ The integer capabilities: normalized coordinates, and mipmaps. * ``PIPE_CAP_TWO_SIDED_STENCIL``: Whether the stencil test can also affect back-facing polygons. -* ``PIPE_CAP_DUAL_SOURCE_BLEND``: Whether dual-source blend factors are supported. See +* ``PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS``: How many dual-source blend RTs are support. :ref:`Blend` for more information. * ``PIPE_CAP_ANISOTROPIC_FILTER``: Whether textures can be filtered anisotropically. * ``PIPE_CAP_POINT_SPRITE``: Whether point sprites are available. diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c index 5873d9a7872..d12fa4e8249 100644 --- a/src/gallium/drivers/r300/r300_screen.c +++ b/src/gallium/drivers/r300/r300_screen.c @@ -120,7 +120,7 @@ static int r300_get_param(struct pipe_screen* pscreen, enum pipe_cap param) /* Unsupported features. */ case PIPE_CAP_TIMER_QUERY: - case PIPE_CAP_DUAL_SOURCE_BLEND: + case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: case PIPE_CAP_INDEP_BLEND_ENABLE: case PIPE_CAP_INDEP_BLEND_FUNC: case PIPE_CAP_DEPTH_CLIP_DISABLE: diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 7c40e506fb7..49c79f16ffa 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -380,7 +380,6 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) /* Supported features (boolean caps). */ case PIPE_CAP_NPOT_TEXTURES: case PIPE_CAP_TWO_SIDED_STENCIL: - case PIPE_CAP_DUAL_SOURCE_BLEND: case PIPE_CAP_ANISOTROPIC_FILTER: case PIPE_CAP_POINT_SPRITE: case PIPE_CAP_OCCLUSION_QUERY: @@ -465,6 +464,9 @@ static int r600_get_param(struct pipe_screen* pscreen, enum pipe_cap param) case PIPE_CAP_MAX_TEXEL_OFFSET: return 7; + + case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: + return 0; } return 0; } diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 183ed9ae774..b1ab14228ef 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -79,6 +79,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) return 1; case PIPE_CAP_MAX_RENDER_TARGETS: return PIPE_MAX_COLOR_BUFS; + case PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS: + return 0; case PIPE_CAP_OCCLUSION_QUERY: return 1; case PIPE_CAP_TIMER_QUERY: diff --git a/src/gallium/include/pipe/p_defines.h b/src/gallium/include/pipe/p_defines.h index e49d1922ea6..03a5f85884f 100644 --- a/src/gallium/include/pipe/p_defines.h +++ b/src/gallium/include/pipe/p_defines.h @@ -423,7 +423,7 @@ enum pipe_transfer_usage { enum pipe_cap { PIPE_CAP_NPOT_TEXTURES = 1, PIPE_CAP_TWO_SIDED_STENCIL = 2, - PIPE_CAP_DUAL_SOURCE_BLEND = 4, + PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS = 4, PIPE_CAP_ANISOTROPIC_FILTER = 5, PIPE_CAP_POINT_SPRITE = 6, PIPE_CAP_MAX_RENDER_TARGETS = 7, -- 2.30.2