Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: command_buffer/service/win/d3d9/states_d3d9.cc

Issue 234002: More work in Command Buffers... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2009, Google Inc. 2 * Copyright 2009, Google Inc.
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 24 matching lines...) Expand all
35 35
36 #include <algorithm> 36 #include <algorithm>
37 #include "command_buffer/common/cross/cmd_buffer_format.h" 37 #include "command_buffer/common/cross/cmd_buffer_format.h"
38 #include "command_buffer/service/win/d3d9/gapi_d3d9.h" 38 #include "command_buffer/service/win/d3d9/gapi_d3d9.h"
39 39
40 namespace o3d { 40 namespace o3d {
41 namespace command_buffer { 41 namespace command_buffer {
42 42
43 namespace { 43 namespace {
44 44
45 // Checks that a GAPIInterface enum matches a D3D enum so that it can be 45 // Checks that a command_buffer enum matches a D3D enum so that it can be
46 // converted quickly. 46 // converted quickly.
47 #define CHECK_GAPI_ENUM_MATCHES_D3D(GAPI_ENUM, D3D_ENUM) \ 47 #define CHECK_CB_ENUM_MATCHES_D3D(CB_ENUM, D3D_ENUM) \
48 COMPILE_ASSERT(GAPIInterface::GAPI_ENUM + 1 == D3D_ENUM, \ 48 COMPILE_ASSERT(command_buffer::CB_ENUM + 1 == D3D_ENUM, \
49 GAPI_ENUM ## _plus_1_not_ ## D3D_ENUM) 49 CB_ENUM ## _plus_1_not_ ## D3D_ENUM)
50 50
51 // Converts values from the PolygonMode enum to corresponding D3D values 51 // Converts values from the PolygonMode enum to corresponding D3D values
52 inline D3DFILLMODE PolygonModeToD3D(GAPIInterface::PolygonMode fill_mode) { 52 inline D3DFILLMODE PolygonModeToD3D(command_buffer::PolygonMode fill_mode) {
53 DCHECK_LT(fill_mode, GAPIInterface::NUM_POLYGON_MODE); 53 DCHECK_LT(fill_mode, command_buffer::kNumPolygonMode);
54 54
55 // Check that all acceptable values translate to D3D values by adding 1. 55 // Check that all acceptable values translate to D3D values by adding 1.
56 56
57 CHECK_GAPI_ENUM_MATCHES_D3D(POLYGON_MODE_POINTS, D3DFILL_POINT); 57 CHECK_CB_ENUM_MATCHES_D3D(kPolygonModePoints, D3DFILL_POINT);
58 CHECK_GAPI_ENUM_MATCHES_D3D(POLYGON_MODE_LINES, D3DFILL_WIREFRAME); 58 CHECK_CB_ENUM_MATCHES_D3D(kPolygonModeLines, D3DFILL_WIREFRAME);
59 CHECK_GAPI_ENUM_MATCHES_D3D(POLYGON_MODE_FILL, D3DFILL_SOLID); 59 CHECK_CB_ENUM_MATCHES_D3D(kPolygonModeFill, D3DFILL_SOLID);
60 return static_cast<D3DFILLMODE>(fill_mode + 1); 60 return static_cast<D3DFILLMODE>(fill_mode + 1);
61 } 61 }
62 62
63 // Converts values from the FaceCullMode enum to corresponding D3D values 63 // Converts values from the FaceCullMode enum to corresponding D3D values
64 inline D3DCULL FaceCullModeToD3D(GAPIInterface::FaceCullMode cull_mode) { 64 inline D3DCULL FaceCullModeToD3D(command_buffer::FaceCullMode cull_mode) {
65 DCHECK_LT(cull_mode, GAPIInterface::NUM_FACE_CULL_MODE); 65 DCHECK_LT(cull_mode, command_buffer::kNumFaceCullMode);
66 66
67 // Check that all acceptable values translate to D3D values by adding 1. 67 // Check that all acceptable values translate to D3D values by adding 1.
68 CHECK_GAPI_ENUM_MATCHES_D3D(CULL_NONE, D3DCULL_NONE); 68 CHECK_CB_ENUM_MATCHES_D3D(kCullNone, D3DCULL_NONE);
69 CHECK_GAPI_ENUM_MATCHES_D3D(CULL_CW, D3DCULL_CW); 69 CHECK_CB_ENUM_MATCHES_D3D(kCullCW, D3DCULL_CW);
70 CHECK_GAPI_ENUM_MATCHES_D3D(CULL_CCW, D3DCULL_CCW); 70 CHECK_CB_ENUM_MATCHES_D3D(kCullCCW, D3DCULL_CCW);
71 return static_cast<D3DCULL>(cull_mode + 1); 71 return static_cast<D3DCULL>(cull_mode + 1);
72 } 72 }
73 73
74 // Converts values from the Comparison enum to corresponding D3D values 74 // Converts values from the Comparison enum to corresponding D3D values
75 inline D3DCMPFUNC ComparisonToD3D(GAPIInterface::Comparison comp) { 75 inline D3DCMPFUNC ComparisonToD3D(command_buffer::Comparison comp) {
76 DCHECK_LT(comp, GAPIInterface::NUM_COMPARISON); 76 DCHECK_LT(comp, command_buffer::kNumComparison);
77 77
78 // Check that all acceptable values translate to D3D values by adding 1. 78 // Check that all acceptable values translate to D3D values by adding 1.
79 CHECK_GAPI_ENUM_MATCHES_D3D(NEVER, D3DCMP_NEVER); 79 CHECK_CB_ENUM_MATCHES_D3D(kNever, D3DCMP_NEVER);
80 CHECK_GAPI_ENUM_MATCHES_D3D(LESS, D3DCMP_LESS); 80 CHECK_CB_ENUM_MATCHES_D3D(kLess, D3DCMP_LESS);
81 CHECK_GAPI_ENUM_MATCHES_D3D(EQUAL, D3DCMP_EQUAL); 81 CHECK_CB_ENUM_MATCHES_D3D(kEqual, D3DCMP_EQUAL);
82 CHECK_GAPI_ENUM_MATCHES_D3D(LEQUAL, D3DCMP_LESSEQUAL); 82 CHECK_CB_ENUM_MATCHES_D3D(kLEqual, D3DCMP_LESSEQUAL);
83 CHECK_GAPI_ENUM_MATCHES_D3D(GREATER, D3DCMP_GREATER); 83 CHECK_CB_ENUM_MATCHES_D3D(kGreater, D3DCMP_GREATER);
84 CHECK_GAPI_ENUM_MATCHES_D3D(NOT_EQUAL, D3DCMP_NOTEQUAL); 84 CHECK_CB_ENUM_MATCHES_D3D(kNotEqual, D3DCMP_NOTEQUAL);
85 CHECK_GAPI_ENUM_MATCHES_D3D(GEQUAL, D3DCMP_GREATEREQUAL); 85 CHECK_CB_ENUM_MATCHES_D3D(kGEqual, D3DCMP_GREATEREQUAL);
86 CHECK_GAPI_ENUM_MATCHES_D3D(ALWAYS, D3DCMP_ALWAYS); 86 CHECK_CB_ENUM_MATCHES_D3D(kAlways, D3DCMP_ALWAYS);
87 return static_cast<D3DCMPFUNC>(comp + 1); 87 return static_cast<D3DCMPFUNC>(comp + 1);
88 } 88 }
89 89
90 // Converts values from the StencilOp enum to corresponding D3D values 90 // Converts values from the StencilOp enum to corresponding D3D values
91 inline D3DSTENCILOP StencilOpToD3D(GAPIInterface::StencilOp stencil_op) { 91 inline D3DSTENCILOP StencilOpToD3D(command_buffer::StencilOp stencil_op) {
92 DCHECK_LT(stencil_op, GAPIInterface::NUM_STENCIL_OP); 92 DCHECK_LT(stencil_op, command_buffer::kNumStencilOp);
93 93
94 // Check that all acceptable values translate to D3D values by adding 1. 94 // Check that all acceptable values translate to D3D values by adding 1.
95 CHECK_GAPI_ENUM_MATCHES_D3D(KEEP, D3DSTENCILOP_KEEP); 95 CHECK_CB_ENUM_MATCHES_D3D(kKeep, D3DSTENCILOP_KEEP);
96 CHECK_GAPI_ENUM_MATCHES_D3D(ZERO, D3DSTENCILOP_ZERO); 96 CHECK_CB_ENUM_MATCHES_D3D(kZero, D3DSTENCILOP_ZERO);
97 CHECK_GAPI_ENUM_MATCHES_D3D(REPLACE, D3DSTENCILOP_REPLACE); 97 CHECK_CB_ENUM_MATCHES_D3D(kReplace, D3DSTENCILOP_REPLACE);
98 CHECK_GAPI_ENUM_MATCHES_D3D(INC_NO_WRAP, D3DSTENCILOP_INCRSAT); 98 CHECK_CB_ENUM_MATCHES_D3D(kIncNoWrap, D3DSTENCILOP_INCRSAT);
99 CHECK_GAPI_ENUM_MATCHES_D3D(DEC_NO_WRAP, D3DSTENCILOP_DECRSAT); 99 CHECK_CB_ENUM_MATCHES_D3D(kDecNoWrap, D3DSTENCILOP_DECRSAT);
100 CHECK_GAPI_ENUM_MATCHES_D3D(INVERT, D3DSTENCILOP_INVERT); 100 CHECK_CB_ENUM_MATCHES_D3D(kInvert, D3DSTENCILOP_INVERT);
101 CHECK_GAPI_ENUM_MATCHES_D3D(INC_WRAP, D3DSTENCILOP_INCR); 101 CHECK_CB_ENUM_MATCHES_D3D(kIncWrap, D3DSTENCILOP_INCR);
102 CHECK_GAPI_ENUM_MATCHES_D3D(DEC_WRAP, D3DSTENCILOP_DECR); 102 CHECK_CB_ENUM_MATCHES_D3D(kDecWrap, D3DSTENCILOP_DECR);
103 return static_cast<D3DSTENCILOP>(stencil_op + 1); 103 return static_cast<D3DSTENCILOP>(stencil_op + 1);
104 } 104 }
105 105
106 // Converts values from the BlendEq enum to corresponding D3D values 106 // Converts values from the BlendEq enum to corresponding D3D values
107 inline D3DBLENDOP BlendEqToD3D(GAPIInterface::BlendEq blend_eq) { 107 inline D3DBLENDOP BlendEqToD3D(command_buffer::BlendEq blend_eq) {
108 DCHECK_LT(blend_eq, GAPIInterface::NUM_BLEND_EQ); 108 DCHECK_LT(blend_eq, command_buffer::kNumBlendEq);
109 // Check that all acceptable values translate to D3D values by adding 1. 109 // Check that all acceptable values translate to D3D values by adding 1.
110 CHECK_GAPI_ENUM_MATCHES_D3D(BLEND_EQ_ADD, D3DBLENDOP_ADD); 110 CHECK_CB_ENUM_MATCHES_D3D(kBlendEqAdd, D3DBLENDOP_ADD);
111 CHECK_GAPI_ENUM_MATCHES_D3D(BLEND_EQ_SUB, D3DBLENDOP_SUBTRACT); 111 CHECK_CB_ENUM_MATCHES_D3D(kBlendEqSub, D3DBLENDOP_SUBTRACT);
112 CHECK_GAPI_ENUM_MATCHES_D3D(BLEND_EQ_REV_SUB, D3DBLENDOP_REVSUBTRACT); 112 CHECK_CB_ENUM_MATCHES_D3D(kBlendEqRevSub, D3DBLENDOP_REVSUBTRACT);
113 CHECK_GAPI_ENUM_MATCHES_D3D(BLEND_EQ_MIN, D3DBLENDOP_MIN); 113 CHECK_CB_ENUM_MATCHES_D3D(kBlendEqMin, D3DBLENDOP_MIN);
114 CHECK_GAPI_ENUM_MATCHES_D3D(BLEND_EQ_MAX, D3DBLENDOP_MAX); 114 CHECK_CB_ENUM_MATCHES_D3D(kBlendEqMax, D3DBLENDOP_MAX);
115 return static_cast<D3DBLENDOP>(blend_eq + 1); 115 return static_cast<D3DBLENDOP>(blend_eq + 1);
116 } 116 }
117 117
118 // Converts values from the BlendFunc enum to corresponding D3D values 118 // Converts values from the BlendFunc enum to corresponding D3D values
119 D3DBLEND BlendFuncToD3D(GAPIInterface::BlendFunc blend_func) { 119 D3DBLEND BlendFuncToD3D(command_buffer::BlendFunc blend_func) {
120 // The D3DBLEND enum values don't map 1-to-1 to BlendFunc, so we use a switch 120 // The D3DBLEND enum values don't map 1-to-1 to BlendFunc, so we use a switch
121 // here. 121 // here.
122 switch (blend_func) { 122 switch (blend_func) {
123 case GAPIInterface::BLEND_FUNC_ZERO: 123 case command_buffer::kBlendFuncZero:
124 return D3DBLEND_ZERO; 124 return D3DBLEND_ZERO;
125 case GAPIInterface::BLEND_FUNC_ONE: 125 case command_buffer::kBlendFuncOne:
126 return D3DBLEND_ONE; 126 return D3DBLEND_ONE;
127 case GAPIInterface::BLEND_FUNC_SRC_COLOR: 127 case command_buffer::kBlendFuncSrcColor:
128 return D3DBLEND_SRCCOLOR; 128 return D3DBLEND_SRCCOLOR;
129 case GAPIInterface::BLEND_FUNC_INV_SRC_COLOR: 129 case command_buffer::kBlendFuncInvSrcColor:
130 return D3DBLEND_INVSRCCOLOR; 130 return D3DBLEND_INVSRCCOLOR;
131 case GAPIInterface::BLEND_FUNC_SRC_ALPHA: 131 case command_buffer::kBlendFuncSrcAlpha:
132 return D3DBLEND_SRCALPHA; 132 return D3DBLEND_SRCALPHA;
133 case GAPIInterface::BLEND_FUNC_INV_SRC_ALPHA: 133 case command_buffer::kBlendFuncInvSrcAlpha:
134 return D3DBLEND_INVSRCALPHA; 134 return D3DBLEND_INVSRCALPHA;
135 case GAPIInterface::BLEND_FUNC_DST_ALPHA: 135 case command_buffer::kBlendFuncDstAlpha:
136 return D3DBLEND_DESTALPHA; 136 return D3DBLEND_DESTALPHA;
137 case GAPIInterface::BLEND_FUNC_INV_DST_ALPHA: 137 case command_buffer::kBlendFuncInvDstAlpha:
138 return D3DBLEND_INVDESTALPHA; 138 return D3DBLEND_INVDESTALPHA;
139 case GAPIInterface::BLEND_FUNC_DST_COLOR: 139 case command_buffer::kBlendFuncDstColor:
140 return D3DBLEND_DESTCOLOR; 140 return D3DBLEND_DESTCOLOR;
141 case GAPIInterface::BLEND_FUNC_INV_DST_COLOR: 141 case command_buffer::kBlendFuncInvDstColor:
142 return D3DBLEND_INVDESTCOLOR; 142 return D3DBLEND_INVDESTCOLOR;
143 case GAPIInterface::BLEND_FUNC_SRC_ALPHA_SATUTRATE: 143 case command_buffer::kBlendFuncSrcAlphaSaturate:
144 return D3DBLEND_SRCALPHASAT; 144 return D3DBLEND_SRCALPHASAT;
145 case GAPIInterface::BLEND_FUNC_BLEND_COLOR: 145 case command_buffer::kBlendFuncBlendColor:
146 return D3DBLEND_BLENDFACTOR; 146 return D3DBLEND_BLENDFACTOR;
147 case GAPIInterface::BLEND_FUNC_INV_BLEND_COLOR: 147 case command_buffer::kBlendFuncInvBlendColor:
148 return D3DBLEND_INVBLENDFACTOR; 148 return D3DBLEND_INVBLENDFACTOR;
149 default: 149 default:
150 DLOG(FATAL) << "Invalid BlendFunc"; 150 DLOG(FATAL) << "Invalid BlendFunc";
151 return D3DBLEND_ZERO; 151 return D3DBLEND_ZERO;
152 } 152 }
153 } 153 }
154 154
155 // Decodes stencil test function and operations from the bitfield. 155 // Decodes stencil test function and operations from the bitfield.
156 void DecodeStencilFuncOps(Uint32 params, 156 void DecodeStencilFuncOps(Uint32 params,
157 GAPIInterface::Comparison *func, 157 command_buffer::Comparison *func,
158 GAPIInterface::StencilOp *pass, 158 command_buffer::StencilOp *pass,
159 GAPIInterface::StencilOp *fail, 159 command_buffer::StencilOp *fail,
160 GAPIInterface::StencilOp *zfail) { 160 command_buffer::StencilOp *zfail) {
161 namespace cmd = set_stencil_test;
162 // Sanity check. The value has already been tested in 161 // Sanity check. The value has already been tested in
163 // GAPIDecoder::DecodeSetStencilTest in gapi_decoder.cc. 162 // GAPIDecoder::DecodeSetStencilTest in gapi_decoder.cc.
164 DCHECK_EQ(cmd::Unused1::Get(params), 0); 163 DCHECK_EQ(cmd::SetStencilTest::Unused1::Get(params), 0);
165 // Check that the bitmask get cannot generate values outside of the allowed 164 // Check that the bitmask get cannot generate values outside of the allowed
166 // range. 165 // range.
167 COMPILE_ASSERT(cmd::CWFunc::kMask < GAPIInterface::NUM_COMPARISON, 166 COMPILE_ASSERT(cmd::SetStencilTest::CWFunc::kMask <
167 command_buffer::kNumComparison,
168 set_stencil_test_CWFunc_may_produce_invalid_values); 168 set_stencil_test_CWFunc_may_produce_invalid_values);
169 *func = static_cast<GAPIInterface::Comparison>(cmd::CWFunc::Get(params)); 169 *func = static_cast<command_buffer::Comparison>(
170 cmd::SetStencilTest::CWFunc::Get(params));
170 171
171 COMPILE_ASSERT(cmd::CWPassOp::kMask < GAPIInterface::NUM_STENCIL_OP, 172 COMPILE_ASSERT(cmd::SetStencilTest::CWPassOp::kMask <
173 command_buffer::kNumStencilOp,
172 set_stencil_test_CWPassOp_may_produce_invalid_values); 174 set_stencil_test_CWPassOp_may_produce_invalid_values);
173 *pass = static_cast<GAPIInterface::StencilOp>(cmd::CWPassOp::Get(params)); 175 *pass = static_cast<command_buffer::StencilOp>(
176 cmd::SetStencilTest::CWPassOp::Get(params));
174 177
175 COMPILE_ASSERT(cmd::CWFailOp::kMask < GAPIInterface::NUM_STENCIL_OP, 178 COMPILE_ASSERT(cmd::SetStencilTest::CWFailOp::kMask <
179 command_buffer::kNumStencilOp,
176 set_stencil_test_CWFailOp_may_produce_invalid_values); 180 set_stencil_test_CWFailOp_may_produce_invalid_values);
177 *fail = static_cast<GAPIInterface::StencilOp>(cmd::CWFailOp::Get(params)); 181 *fail = static_cast<command_buffer::StencilOp>(
182 cmd::SetStencilTest::CWFailOp::Get(params));
178 183
179 COMPILE_ASSERT(cmd::CWZFailOp::kMask < GAPIInterface::NUM_STENCIL_OP, 184 COMPILE_ASSERT(cmd::SetStencilTest::CWZFailOp::kMask <
185 command_buffer::kNumStencilOp,
180 set_stencil_test_CWZFailOp_may_produce_invalid_values); 186 set_stencil_test_CWZFailOp_may_produce_invalid_values);
181 *zfail = static_cast<GAPIInterface::StencilOp>(cmd::CWZFailOp::Get(params)); 187 *zfail = static_cast<command_buffer::StencilOp>(
188 cmd::SetStencilTest::CWZFailOp::Get(params));
182 } 189 }
183 190
184 } // anonymous namespace 191 } // anonymous namespace
185 192
186 void GAPID3D9::SetScissor(bool enable, 193 void GAPID3D9::SetScissor(bool enable,
187 unsigned int x, 194 unsigned int x,
188 unsigned int y, 195 unsigned int y,
189 unsigned int width, 196 unsigned int width,
190 unsigned int height) { 197 unsigned int height) {
191 HR(d3d_device_->SetRenderState(D3DRS_SCISSORTESTENABLE, 198 HR(d3d_device_->SetRenderState(D3DRS_SCISSORTESTENABLE,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 StencilOpToD3D(fail))); 273 StencilOpToD3D(fail)));
267 HR(d3d_device_->SetRenderState(D3DRS_STENCILZFAIL, 274 HR(d3d_device_->SetRenderState(D3DRS_STENCILZFAIL,
268 StencilOpToD3D(zfail))); 275 StencilOpToD3D(zfail)));
269 276
270 if (separate_ccw) { 277 if (separate_ccw) {
271 HR(d3d_device_->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, TRUE)); 278 HR(d3d_device_->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, TRUE));
272 // Check that the definition of the counter-clockwise func/ops match the 279 // Check that the definition of the counter-clockwise func/ops match the
273 // clockwise ones, just shifted by 16 bits, so that we can use 280 // clockwise ones, just shifted by 16 bits, so that we can use
274 // DecodeStencilFuncOps on both of them. 281 // DecodeStencilFuncOps on both of them.
275 #define CHECK_CCW_MATCHES_CW(FIELD) \ 282 #define CHECK_CCW_MATCHES_CW(FIELD) \
276 COMPILE_ASSERT(set_stencil_test::CW ## FIELD::kLength == \ 283 COMPILE_ASSERT(cmd::SetStencilTest::CW ## FIELD::kLength == \
277 set_stencil_test::CCW ## FIELD::kLength, \ 284 cmd::SetStencilTest::CCW ## FIELD::kLength, \
278 CCW ## FIELD ## _length_does_not_match_ ## CW ## FIELD); \ 285 CCW ## FIELD ## _length_does_not_match_ ## CW ## FIELD); \
279 COMPILE_ASSERT(set_stencil_test::CW ## FIELD::kShift + 16 == \ 286 COMPILE_ASSERT(cmd::SetStencilTest::CW ## FIELD::kShift + 16 == \
280 set_stencil_test::CCW ## FIELD::kShift, \ 287 cmd::SetStencilTest::CCW ## FIELD::kShift, \
281 CCW ## FIELD ## _shift_does_not_match_ ## CW ## FIELD) 288 CCW ## FIELD ## _shift_does_not_match_ ## CW ## FIELD)
282 CHECK_CCW_MATCHES_CW(Func); 289 CHECK_CCW_MATCHES_CW(Func);
283 CHECK_CCW_MATCHES_CW(PassOp); 290 CHECK_CCW_MATCHES_CW(PassOp);
284 CHECK_CCW_MATCHES_CW(FailOp); 291 CHECK_CCW_MATCHES_CW(FailOp);
285 CHECK_CCW_MATCHES_CW(ZFailOp); 292 CHECK_CCW_MATCHES_CW(ZFailOp);
286 #undef CHECK_CCW_MATCHES_CW 293 #undef CHECK_CCW_MATCHES_CW
287 // Extract upper 16 bits. 294 // Extract upper 16 bits.
288 Uint32 ccw_func_ops = BitField<16, 16>::Get(func_ops); 295 Uint32 ccw_func_ops = BitField<16, 16>::Get(func_ops);
289 296
290 DecodeStencilFuncOps(ccw_func_ops, &func, &pass, &fail, &zfail); 297 DecodeStencilFuncOps(ccw_func_ops, &func, &pass, &fail, &zfail);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 HR(d3d_device_->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE)); 347 HR(d3d_device_->SetRenderState(D3DRS_SEPARATEALPHABLENDENABLE, FALSE));
341 } 348 }
342 } 349 }
343 350
344 void GAPID3D9::SetBlendingColor(const RGBA &color) { 351 void GAPID3D9::SetBlendingColor(const RGBA &color) {
345 HR(d3d_device_->SetRenderState(D3DRS_BLENDFACTOR, RGBAToD3DCOLOR(color))); 352 HR(d3d_device_->SetRenderState(D3DRS_BLENDFACTOR, RGBAToD3DCOLOR(color)));
346 } 353 }
347 354
348 } // namespace command_buffer 355 } // namespace command_buffer
349 } // namespace o3d 356 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/service/win/d3d9/sampler_d3d9.cc ('k') | command_buffer/service/win/d3d9/texture_d3d9.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698