From 7ae00e7cd01726a905603fcf53e7e53146562883 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Wed, 11 Feb 2015 14:14:45 -0700 Subject: intel: Remove unnecessary dualBlendMode enable bug #12925 header version: r29511 Can determine dualBlendModeEnable from blend information provided. Integrate review feedback. --- icd/common/icd-format.h | 19 +++++++++++++++++++ include/xgl.h | 3 +-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/icd/common/icd-format.h b/icd/common/icd-format.h index 0d52c46a..28c2dcae 100644 --- a/icd/common/icd-format.h +++ b/icd/common/icd-format.h @@ -59,6 +59,25 @@ static inline int icd_format_get_block_width(XGL_FORMAT format) return (icd_format_is_compressed(format)) ? 4 : 1; } +static inline bool icd_blend_mode_is_dual_src(XGL_BLEND mode) +{ + return (mode == XGL_BLEND_SRC1_COLOR) || + (mode == XGL_BLEND_SRC1_ALPHA) || + (mode == XGL_BLEND_ONE_MINUS_SRC1_COLOR) || + (mode == XGL_BLEND_ONE_MINUS_SRC1_ALPHA); +} + +static inline bool icd_pipeline_cb_att_needs_dual_source_blending(const XGL_PIPELINE_CB_ATTACHMENT_STATE *att) +{ + if (icd_blend_mode_is_dual_src(att->srcBlendColor) || + icd_blend_mode_is_dual_src(att->srcBlendAlpha) || + icd_blend_mode_is_dual_src(att->destBlendColor) || + icd_blend_mode_is_dual_src(att->destBlendAlpha)) { + return true; + } + return false; +} + size_t icd_format_get_size(XGL_FORMAT format); XGL_IMAGE_FORMAT_CLASS icd_format_get_class(XGL_FORMAT format); diff --git a/include/xgl.h b/include/xgl.h index e27b910d..cd6f4ba4 100644 --- a/include/xgl.h +++ b/include/xgl.h @@ -33,7 +33,7 @@ #include "xglPlatform.h" // XGL API version supported by this file -#define XGL_API_VERSION XGL_MAKE_VERSION(0, 48, 1) +#define XGL_API_VERSION XGL_MAKE_VERSION(0, 48, 2) #ifdef __cplusplus extern "C" @@ -1966,7 +1966,6 @@ typedef struct _XGL_PIPELINE_CB_STATE_CREATE_INFO XGL_STRUCTURE_TYPE sType; // Must be XGL_STRUCTURE_TYPE_PIPELINE_CB_STATE_CREATE_INFO const void* pNext; // Pointer to next structure bool32_t alphaToCoverageEnable; - bool32_t dualSourceBlendEnable; // optional (GL45) bool32_t logicOpEnable; XGL_LOGIC_OP logicOp; uint32_t attachmentCount; // # of pAttachments -- cgit v1.2.3