aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCourtney Goeltzenleuchter <courtney@LunarG.com>2015-02-11 14:14:45 -0700
committerCourtney Goeltzenleuchter <courtney@LunarG.com>2015-02-17 10:20:49 -0700
commit7ae00e7cd01726a905603fcf53e7e53146562883 (patch)
tree43fba909b2f893ec1d28f549d245bc8e1d00c3dd
parent1710d8d2cd8b73668c19bec9cad34e40b2aa68f8 (diff)
downloadusermoji-7ae00e7cd01726a905603fcf53e7e53146562883.tar.xz
intel: Remove unnecessary dualBlendMode enable
bug #12925 header version: r29511 Can determine dualBlendModeEnable from blend information provided. Integrate review feedback.
-rw-r--r--icd/common/icd-format.h19
-rw-r--r--include/xgl.h3
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