Lines Matching refs:blendStateExt
42 const gl::BlendStateExt blendStateExt = gl::BlendStateExt(c); in TEST() local
43 ASSERT_EQ(blendStateExt.getDrawBufferCount(), c); in TEST()
45 ASSERT_EQ(blendStateExt.getEnabledMask().to_ulong(), 0u); in TEST()
46 ASSERT_EQ(blendStateExt.getAllEnabledMask().to_ulong(), allEnabledMasks[c]); in TEST()
48 ASSERT_EQ(blendStateExt.getColorMaskBits(), blendStateExt.getAllColorMaskBits()); in TEST()
49 ASSERT_EQ(blendStateExt.getAllColorMaskBits(), in TEST()
52 ASSERT_EQ(blendStateExt.getUsesAdvancedBlendEquationMask().to_ulong(), 0u); in TEST()
54 ASSERT_EQ(blendStateExt.getUsesExtendedBlendFactorMask().to_ulong(), 0u); in TEST()
56 ASSERT_EQ(blendStateExt.getSrcColorBits(), sourceColorAlpha[c]); in TEST()
57 ASSERT_EQ(blendStateExt.getSrcAlphaBits(), sourceColorAlpha[c]); in TEST()
58 ASSERT_EQ(blendStateExt.getDstColorBits(), 0u); in TEST()
59 ASSERT_EQ(blendStateExt.getDstAlphaBits(), 0u); in TEST()
61 ASSERT_EQ(blendStateExt.getEquationColorBits(), 0u); in TEST()
62 ASSERT_EQ(blendStateExt.getEquationAlphaBits(), 0u); in TEST()
66 ASSERT_FALSE(blendStateExt.getEnabledMask().test(i)); in TEST()
69 blendStateExt.getColorMaskIndexed(i, &r, &g, &b, &a); in TEST()
75 ASSERT_EQ(blendStateExt.getEquationColorIndexed(i), gl::BlendEquationType::Add); in TEST()
76 ASSERT_EQ(blendStateExt.getEquationAlphaIndexed(i), gl::BlendEquationType::Add); in TEST()
78 ASSERT_EQ(blendStateExt.getSrcColorIndexed(i), gl::BlendFactorType::One); in TEST()
79 ASSERT_EQ(blendStateExt.getDstColorIndexed(i), gl::BlendFactorType::Zero); in TEST()
80 ASSERT_EQ(blendStateExt.getSrcAlphaIndexed(i), gl::BlendFactorType::One); in TEST()
81 ASSERT_EQ(blendStateExt.getDstAlphaIndexed(i), gl::BlendFactorType::Zero); in TEST()
93 gl::BlendStateExt blendStateExt = gl::BlendStateExt(c); in TEST() local
95 blendStateExt.setEnabled(true); in TEST()
96 ASSERT_EQ(blendStateExt.getEnabledMask().to_ulong(), enabled[c]); in TEST()
98 blendStateExt.setEnabled(false); in TEST()
99 ASSERT_EQ(blendStateExt.getEnabledMask().to_ulong(), 0u); in TEST()
101 blendStateExt.setEnabledIndexed(c / 2, true); in TEST()
102 ASSERT_EQ(blendStateExt.getEnabledMask().to_ulong(), 1u << (c / 2)); in TEST()
104 blendStateExt.setEnabledIndexed(c / 2, false); in TEST()
105 ASSERT_EQ(blendStateExt.getEnabledMask().to_ulong(), 0u); in TEST()
160 gl::BlendStateExt blendStateExt = gl::BlendStateExt(c); in TEST() local
162 blendStateExt.setColorMask(true, false, true, false); in TEST()
163 ASSERT_EQ(blendStateExt.getColorMaskBits(), in TEST()
166 blendStateExt.setColorMaskIndexed(c / 2, false, true, false, true); in TEST()
169 ASSERT_EQ(blendStateExt.getColorMaskIndexed(i), i == c / 2 ? 0xAu : 0x5u); in TEST()
172 blendStateExt.setColorMaskIndexed(0, 0xF); in TEST()
174 blendStateExt.getColorMaskIndexed(0, &r, &g, &b, &a); in TEST()
180 blendStateExt.setColorMaskIndexed(c - 1, true, false, true, true); in TEST()
182 blendStateExt.expandColorMaskIndexed(c - 1); in TEST()
190 const gl::DrawBufferMask diff = blendStateExt.compareColorMask(otherColorMask); in TEST()
196 blendStateExt.setColorMask(true, true, true, true); in TEST()
197 blendStateExt.setColorMaskIndexed(c / 2, false, false, true, false); in TEST()
199 blendStateExt.compareColorMask(blendStateExt.getAllColorMaskBits()); in TEST()
208 gl::BlendStateExt blendStateExt = gl::BlendStateExt(7); in TEST() local
210 blendStateExt.setEquations(GL_MIN, GL_FUNC_SUBTRACT); in TEST()
211 ASSERT_EQ(blendStateExt.getEquationColorBits(), 0x01010101010101u); in TEST()
212 ASSERT_EQ(blendStateExt.getEquationAlphaBits(), 0x04040404040404u); in TEST()
214 blendStateExt.setEquationsIndexed(3, GL_MAX, GL_FUNC_SUBTRACT); in TEST()
215 blendStateExt.setEquationsIndexed(5, GL_MIN, GL_FUNC_ADD); in TEST()
216 ASSERT_EQ(blendStateExt.getEquationColorBits(), 0x01010102010101u); in TEST()
217 ASSERT_EQ(blendStateExt.getEquationAlphaBits(), 0x04000404040404u); in TEST()
218 ASSERT_EQ(blendStateExt.getEquationColorIndexed(3), gl::BlendEquationType::Max); in TEST()
219 ASSERT_EQ(blendStateExt.getEquationAlphaIndexed(5), gl::BlendEquationType::Add); in TEST()
222 blendStateExt.expandEquationColorIndexed(0); in TEST()
224 blendStateExt.expandEquationAlphaIndexed(0); in TEST()
230 blendStateExt.compareEquations(otherEquationColor, otherEquationAlpha); in TEST()
234 blendStateExt.setEquationsIndexed(0, 3, blendStateExt); in TEST()
235 ASSERT_EQ(blendStateExt.getEquationColorIndexed(0), gl::BlendEquationType::Max); in TEST()
236 ASSERT_EQ(blendStateExt.getEquationAlphaIndexed(0), gl::BlendEquationType::Subtract); in TEST()
239 blendStateExt.setEquationsIndexed(0, 5, blendStateExt); in TEST()
240 ASSERT_EQ(blendStateExt.getEquationColorIndexed(0), gl::BlendEquationType::Min); in TEST()
241 ASSERT_EQ(blendStateExt.getEquationAlphaIndexed(0), gl::BlendEquationType::Add); in TEST()
247 gl::BlendStateExt blendStateExt = gl::BlendStateExt(8); in TEST() local
249 blendStateExt.setFactors(GL_SRC_COLOR, GL_DST_COLOR, GL_SRC_ALPHA, GL_DST_ALPHA); in TEST()
250 ASSERT_EQ(blendStateExt.getSrcColorBits(), 0x0202020202020202u); in TEST()
251 ASSERT_EQ(blendStateExt.getDstColorBits(), 0x0808080808080808u); in TEST()
252 ASSERT_EQ(blendStateExt.getSrcAlphaBits(), 0x0404040404040404u); in TEST()
253 ASSERT_EQ(blendStateExt.getDstAlphaBits(), 0x0606060606060606u); in TEST()
255 blendStateExt.setFactorsIndexed(0, GL_ONE, GL_DST_COLOR, GL_SRC_ALPHA, GL_DST_ALPHA); in TEST()
256 blendStateExt.setFactorsIndexed(3, GL_SRC_COLOR, GL_ONE, GL_SRC_ALPHA, GL_DST_ALPHA); in TEST()
257 blendStateExt.setFactorsIndexed(5, GL_SRC_COLOR, GL_DST_COLOR, GL_ONE, GL_DST_ALPHA); in TEST()
258 blendStateExt.setFactorsIndexed(7, GL_SRC_COLOR, GL_DST_COLOR, GL_SRC_ALPHA, GL_ONE); in TEST()
259 ASSERT_EQ(blendStateExt.getSrcColorBits(), 0x0202020202020201u); in TEST()
260 ASSERT_EQ(blendStateExt.getDstColorBits(), 0x0808080801080808u); in TEST()
261 ASSERT_EQ(blendStateExt.getSrcAlphaBits(), 0x0404010404040404u); in TEST()
262 ASSERT_EQ(blendStateExt.getDstAlphaBits(), 0x0106060606060606u); in TEST()
264 ASSERT_EQ(blendStateExt.getSrcColorIndexed(0), gl::BlendFactorType::One); in TEST()
265 ASSERT_EQ(blendStateExt.getDstColorIndexed(3), gl::BlendFactorType::One); in TEST()
266 ASSERT_EQ(blendStateExt.getSrcAlphaIndexed(5), gl::BlendFactorType::One); in TEST()
267 ASSERT_EQ(blendStateExt.getDstAlphaIndexed(7), gl::BlendFactorType::One); in TEST()
269 gl::BlendStateExt::FactorStorage::Type otherSrcColor = blendStateExt.expandSrcColorIndexed(1); in TEST()
270 gl::BlendStateExt::FactorStorage::Type otherDstColor = blendStateExt.expandDstColorIndexed(1); in TEST()
271 gl::BlendStateExt::FactorStorage::Type otherSrcAlpha = blendStateExt.expandSrcAlphaIndexed(1); in TEST()
272 gl::BlendStateExt::FactorStorage::Type otherDstAlpha = blendStateExt.expandDstAlphaIndexed(1); in TEST()
280 blendStateExt.compareFactors(otherSrcColor, otherDstColor, otherSrcAlpha, otherDstAlpha); in TEST()
284 blendStateExt.setFactorsIndexed(1, 0, blendStateExt); in TEST()
285 ASSERT_EQ(blendStateExt.getSrcColorIndexed(1), gl::BlendFactorType::One); in TEST()
286 ASSERT_EQ(blendStateExt.getDstColorIndexed(1), gl::BlendFactorType::DstColor); in TEST()
287 ASSERT_EQ(blendStateExt.getSrcAlphaIndexed(1), gl::BlendFactorType::SrcAlpha); in TEST()
288 ASSERT_EQ(blendStateExt.getDstAlphaIndexed(1), gl::BlendFactorType::DstAlpha); in TEST()
291 blendStateExt.setFactorsIndexed(1, 3, blendStateExt); in TEST()
292 ASSERT_EQ(blendStateExt.getSrcColorIndexed(1), gl::BlendFactorType::SrcColor); in TEST()
293 ASSERT_EQ(blendStateExt.getDstColorIndexed(1), gl::BlendFactorType::One); in TEST()
294 ASSERT_EQ(blendStateExt.getSrcAlphaIndexed(1), gl::BlendFactorType::SrcAlpha); in TEST()
295 ASSERT_EQ(blendStateExt.getDstAlphaIndexed(1), gl::BlendFactorType::DstAlpha); in TEST()
298 blendStateExt.setFactorsIndexed(1, 5, blendStateExt); in TEST()
299 ASSERT_EQ(blendStateExt.getSrcColorIndexed(1), gl::BlendFactorType::SrcColor); in TEST()
300 ASSERT_EQ(blendStateExt.getDstColorIndexed(1), gl::BlendFactorType::DstColor); in TEST()
301 ASSERT_EQ(blendStateExt.getSrcAlphaIndexed(1), gl::BlendFactorType::One); in TEST()
302 ASSERT_EQ(blendStateExt.getDstAlphaIndexed(1), gl::BlendFactorType::DstAlpha); in TEST()
305 blendStateExt.setFactorsIndexed(1, 7, blendStateExt); in TEST()
306 ASSERT_EQ(blendStateExt.getSrcColorIndexed(1), gl::BlendFactorType::SrcColor); in TEST()
307 ASSERT_EQ(blendStateExt.getDstColorIndexed(1), gl::BlendFactorType::DstColor); in TEST()
308 ASSERT_EQ(blendStateExt.getSrcAlphaIndexed(1), gl::BlendFactorType::SrcAlpha); in TEST()
309 ASSERT_EQ(blendStateExt.getDstAlphaIndexed(1), gl::BlendFactorType::One); in TEST()