blob: bdb1a86cbc3984692eaeaa0382a1ea276930c324 [file] [log] [blame]
[email protected]e259eb412012-10-13 05:47:241// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// This file contains the ContextState class.
6
7#ifndef GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
8#define GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_
9
mostynb6682b1c42016-04-19 10:17:3010#include <memory>
[email protected]1868a342012-11-07 15:56:0211#include <vector>
mostynb6682b1c42016-04-19 10:17:3012
[email protected]e259eb412012-10-13 05:47:2413#include "base/logging.h"
[email protected]e259eb412012-10-13 05:47:2414#include "gpu/command_buffer/service/gl_utils.h"
bajones5141d032015-12-07 21:13:3915#include "gpu/command_buffer/service/sampler_manager.h"
zmoeaae3bb2016-07-15 19:23:1916#include "gpu/command_buffer/service/shader_manager.h"
[email protected]e259eb412012-10-13 05:47:2417#include "gpu/command_buffer/service/texture_manager.h"
[email protected]e259eb412012-10-13 05:47:2418#include "gpu/command_buffer/service/vertex_array_manager.h"
mostynb6682b1c42016-04-19 10:17:3019#include "gpu/command_buffer/service/vertex_attrib_manager.h"
[email protected]88a61bf2012-10-27 13:00:4220#include "gpu/gpu_export.h"
[email protected]e259eb412012-10-13 05:47:2421
22namespace gpu {
23namespace gles2 {
24
[email protected]31494b82013-02-28 10:10:2625class Buffer;
[email protected]d3eba342013-04-18 21:11:5026class ErrorState;
[email protected]828a3932014-04-02 14:43:1327class ErrorStateClient;
[email protected]b3cbad12012-12-05 19:56:3628class FeatureInfo;
zmo48ee6d3f2016-05-06 20:33:2629class IndexedBufferBindingHost;
dyenb245d372015-07-25 01:18:3830class Logger;
[email protected]31494b82013-02-28 10:10:2631class Program;
32class Renderbuffer;
zmo6c468ba2016-05-04 20:00:5133class TransformFeedback;
[email protected]b3cbad12012-12-05 19:56:3634
[email protected]e259eb412012-10-13 05:47:2435// State associated with each texture unit.
[email protected]88a61bf2012-10-27 13:00:4236struct GPU_EXPORT TextureUnit {
[email protected]e259eb412012-10-13 05:47:2437 TextureUnit();
vmpstr3b7b8b22016-03-01 23:00:2038 TextureUnit(const TextureUnit& other);
[email protected]e259eb412012-10-13 05:47:2439 ~TextureUnit();
40
41 // The last target that was bound to this texture unit.
42 GLenum bind_target;
43
44 // texture currently bound to this unit's GL_TEXTURE_2D with glBindTexture
[email protected]370eaf12013-05-18 09:19:4945 scoped_refptr<TextureRef> bound_texture_2d;
[email protected]e259eb412012-10-13 05:47:2446
47 // texture currently bound to this unit's GL_TEXTURE_CUBE_MAP with
48 // glBindTexture
[email protected]370eaf12013-05-18 09:19:4949 scoped_refptr<TextureRef> bound_texture_cube_map;
[email protected]e259eb412012-10-13 05:47:2450
51 // texture currently bound to this unit's GL_TEXTURE_EXTERNAL_OES with
52 // glBindTexture
[email protected]370eaf12013-05-18 09:19:4953 scoped_refptr<TextureRef> bound_texture_external_oes;
[email protected]e259eb412012-10-13 05:47:2454
55 // texture currently bound to this unit's GL_TEXTURE_RECTANGLE_ARB with
56 // glBindTexture
[email protected]370eaf12013-05-18 09:19:4957 scoped_refptr<TextureRef> bound_texture_rectangle_arb;
[email protected]e259eb412012-10-13 05:47:2458
zmoea06a6f2015-04-30 01:15:4659 // texture currently bound to this unit's GL_TEXTURE_3D with glBindTexture
60 scoped_refptr<TextureRef> bound_texture_3d;
61
62 // texture currently bound to this unit's GL_TEXTURE_2D_ARRAY with
63 // glBindTexture
64 scoped_refptr<TextureRef> bound_texture_2d_array;
65
zmoebb409812017-02-08 19:13:5866 TextureRef* GetInfoForSamplerType(GLenum type) {
[email protected]e259eb412012-10-13 05:47:2467 switch (type) {
68 case GL_SAMPLER_2D:
zmo5e6600b2016-11-17 04:27:4469 case GL_SAMPLER_2D_SHADOW:
70 case GL_INT_SAMPLER_2D:
71 case GL_UNSIGNED_INT_SAMPLER_2D:
zmoebb409812017-02-08 19:13:5872 return bound_texture_2d.get();
[email protected]e259eb412012-10-13 05:47:2473 case GL_SAMPLER_CUBE:
zmo5e6600b2016-11-17 04:27:4474 case GL_SAMPLER_CUBE_SHADOW:
75 case GL_INT_SAMPLER_CUBE:
76 case GL_UNSIGNED_INT_SAMPLER_CUBE:
zmoebb409812017-02-08 19:13:5877 return bound_texture_cube_map.get();
[email protected]e259eb412012-10-13 05:47:2478 case GL_SAMPLER_EXTERNAL_OES:
zmoebb409812017-02-08 19:13:5879 return bound_texture_external_oes.get();
[email protected]e259eb412012-10-13 05:47:2480 case GL_SAMPLER_2D_RECT_ARB:
zmoebb409812017-02-08 19:13:5881 return bound_texture_rectangle_arb.get();
zmoea06a6f2015-04-30 01:15:4682 case GL_SAMPLER_3D:
zmo5e6600b2016-11-17 04:27:4483 case GL_INT_SAMPLER_3D:
84 case GL_UNSIGNED_INT_SAMPLER_3D:
zmoebb409812017-02-08 19:13:5885 return bound_texture_3d.get();
zmoea06a6f2015-04-30 01:15:4686 case GL_SAMPLER_2D_ARRAY:
zmo5e6600b2016-11-17 04:27:4487 case GL_SAMPLER_2D_ARRAY_SHADOW:
88 case GL_INT_SAMPLER_2D_ARRAY:
89 case GL_UNSIGNED_INT_SAMPLER_2D_ARRAY:
zmoebb409812017-02-08 19:13:5890 return bound_texture_2d_array.get();
91 default:
92 NOTREACHED();
93 return nullptr;
[email protected]e259eb412012-10-13 05:47:2494 }
[email protected]e259eb412012-10-13 05:47:2495 }
erikchenffe273b2015-12-17 03:48:1396
zmoebb409812017-02-08 19:13:5897 TextureRef* GetInfoForTarget(GLenum target) {
erikchenffe273b2015-12-17 03:48:1398 switch (target) {
99 case GL_TEXTURE_2D:
zmoebb409812017-02-08 19:13:58100 return bound_texture_2d.get();
erikchenffe273b2015-12-17 03:48:13101 case GL_TEXTURE_CUBE_MAP:
zmoebb409812017-02-08 19:13:58102 return bound_texture_cube_map.get();
erikchenffe273b2015-12-17 03:48:13103 case GL_TEXTURE_EXTERNAL_OES:
zmoebb409812017-02-08 19:13:58104 return bound_texture_external_oes.get();
erikchenffe273b2015-12-17 03:48:13105 case GL_TEXTURE_RECTANGLE_ARB:
zmoebb409812017-02-08 19:13:58106 return bound_texture_rectangle_arb.get();
erikchenffe273b2015-12-17 03:48:13107 case GL_TEXTURE_3D:
zmoebb409812017-02-08 19:13:58108 return bound_texture_3d.get();
erikchenffe273b2015-12-17 03:48:13109 case GL_TEXTURE_2D_ARRAY:
zmoebb409812017-02-08 19:13:58110 return bound_texture_2d_array.get();
111 default:
112 NOTREACHED();
113 return nullptr;
erikchenffe273b2015-12-17 03:48:13114 }
zmoebb409812017-02-08 19:13:58115 }
erikchenffe273b2015-12-17 03:48:13116
zmoebb409812017-02-08 19:13:58117 void SetInfoForTarget(GLenum target, TextureRef* texture_ref) {
118 switch (target) {
119 case GL_TEXTURE_2D:
120 bound_texture_2d = texture_ref;
121 break;
122 case GL_TEXTURE_CUBE_MAP:
123 bound_texture_cube_map = texture_ref;
124 break;
125 case GL_TEXTURE_EXTERNAL_OES:
126 bound_texture_external_oes = texture_ref;
127 break;
128 case GL_TEXTURE_RECTANGLE_ARB:
129 bound_texture_rectangle_arb = texture_ref;
130 break;
131 case GL_TEXTURE_3D:
132 bound_texture_3d = texture_ref;
133 break;
134 case GL_TEXTURE_2D_ARRAY:
135 bound_texture_2d_array = texture_ref;
136 break;
137 default:
138 NOTREACHED();
139 }
erikchenffe273b2015-12-17 03:48:13140 }
[email protected]e259eb412012-10-13 05:47:24141};
142
zmo5ee097e2015-05-14 19:13:52143class GPU_EXPORT Vec4 {
144 public:
[email protected]af6380962012-11-29 23:24:13145 Vec4() {
zmo5ee097e2015-05-14 19:13:52146 v_[0].float_value = 0.0f;
147 v_[1].float_value = 0.0f;
148 v_[2].float_value = 0.0f;
149 v_[3].float_value = 1.0f;
zmoeaae3bb2016-07-15 19:23:19150 type_ = SHADER_VARIABLE_FLOAT;
[email protected]af6380962012-11-29 23:24:13151 }
zmo5ee097e2015-05-14 19:13:52152
153 template <typename T>
154 void GetValues(T* values) const;
155
156 template <typename T>
157 void SetValues(const T* values);
158
zmoeaae3bb2016-07-15 19:23:19159 ShaderVariableBaseType type() const {
zmo5ee097e2015-05-14 19:13:52160 return type_;
161 }
162
163 bool Equal(const Vec4& other) const;
164
165 private:
166 union ValueUnion {
167 GLfloat float_value;
168 GLint int_value;
169 GLuint uint_value;
170 };
171
172 ValueUnion v_[4];
zmoeaae3bb2016-07-15 19:23:19173 ShaderVariableBaseType type_;
[email protected]af6380962012-11-29 23:24:13174};
[email protected]e259eb412012-10-13 05:47:24175
zmo5ee097e2015-05-14 19:13:52176template <>
177GPU_EXPORT void Vec4::GetValues<GLfloat>(GLfloat* values) const;
178template <>
179GPU_EXPORT void Vec4::GetValues<GLint>(GLint* values) const;
180template <>
181GPU_EXPORT void Vec4::GetValues<GLuint>(GLuint* values) const;
182
183template <>
184GPU_EXPORT void Vec4::SetValues<GLfloat>(const GLfloat* values);
185template <>
186GPU_EXPORT void Vec4::SetValues<GLint>(const GLint* values);
187template <>
188GPU_EXPORT void Vec4::SetValues<GLuint>(const GLuint* values);
189
[email protected]88a61bf2012-10-27 13:00:42190struct GPU_EXPORT ContextState {
zmo2b9c47392015-12-11 02:21:32191 enum Dimension {
192 k2D,
193 k3D
194 };
195
[email protected]828a3932014-04-02 14:43:13196 ContextState(FeatureInfo* feature_info,
197 ErrorStateClient* error_state_client,
198 Logger* logger);
[email protected]e259eb412012-10-13 05:47:24199 ~ContextState();
200
Antoine Labour2c1ad962017-10-24 23:32:56201 void set_api(gl::GLApi* api) { api_ = api; }
202 gl::GLApi* api() const { return api_; }
203
[email protected]f731b9462012-10-30 00:35:22204 void Initialize();
205
lof84d5e36962016-11-10 00:35:54206 void SetLineWidthBounds(GLfloat min, GLfloat max);
207
[email protected]454157e2014-05-03 02:49:45208 void SetIgnoreCachedStateForTest(bool ignore) {
209 ignore_cached_state = ignore;
210 }
211
[email protected]8875a5f2014-06-27 08:33:47212 void RestoreState(const ContextState* prev_state);
[email protected]88ba52f2014-04-09 12:39:34213 void InitCapabilities(const ContextState* prev_state) const;
214 void InitState(const ContextState* prev_state) const;
[email protected]f731b9462012-10-30 00:35:22215
[email protected]29a4d902013-02-26 20:18:06216 void RestoreActiveTexture() const;
kbr69c721ec2017-04-26 23:58:51217 void RestoreAllTextureUnitAndSamplerBindings(
218 const ContextState* prev_state) const;
[email protected]4b2d2b262014-03-21 22:05:27219 void RestoreActiveTextureUnitBinding(unsigned int target) const;
[email protected]81f20a622014-04-18 01:54:52220 void RestoreVertexAttribValues() const;
221 void RestoreVertexAttribArrays(
222 const scoped_refptr<VertexAttribManager> attrib_manager) const;
223 void RestoreVertexAttribs() const;
[email protected]29a4d902013-02-26 20:18:06224 void RestoreBufferBindings() const;
[email protected]88ba52f2014-04-09 12:39:34225 void RestoreGlobalState(const ContextState* prev_state) const;
zmo744d40e2016-05-10 20:56:22226 void RestoreProgramSettings(const ContextState* prev_state,
227 bool restore_transform_feedback_bindings) const;
[email protected]8875a5f2014-06-27 08:33:47228 void RestoreRenderbufferBindings();
zmo48ee6d3f2016-05-06 20:33:26229 void RestoreIndexedUniformBufferBindings(const ContextState* prev_state);
[email protected]5baa86bc2014-01-16 04:33:16230 void RestoreTextureUnitBindings(
231 GLuint unit, const ContextState* prev_state) const;
kbr69c721ec2017-04-26 23:58:51232 void RestoreSamplerBinding(GLuint unit, const ContextState* prev_state) const;
[email protected]29a4d902013-02-26 20:18:06233
Zhenyao Mo5f72df0c2017-12-08 21:46:26234 void PushTextureUnpackState() const;
geofflang398fb212016-07-13 16:27:42235 void RestoreUnpackState() const;
lof84d5e36962016-11-10 00:35:54236 void DoLineWidth(GLfloat width) const;
geofflang398fb212016-07-13 16:27:42237
[email protected]d058bca2012-11-26 10:27:26238 // Helper for getting cached state.
239 bool GetStateAsGLint(
240 GLenum pname, GLint* params, GLsizei* num_written) const;
241 bool GetStateAsGLfloat(
242 GLenum pname, GLfloat* params, GLsizei* num_written) const;
243 bool GetEnabled(GLenum cap) const;
244
[email protected]454157e2014-05-03 02:49:45245 inline void SetDeviceColorMask(GLboolean red,
246 GLboolean green,
247 GLboolean blue,
248 GLboolean alpha) {
249 if (cached_color_mask_red == red && cached_color_mask_green == green &&
250 cached_color_mask_blue == blue && cached_color_mask_alpha == alpha &&
251 !ignore_cached_state)
252 return;
253 cached_color_mask_red = red;
254 cached_color_mask_green = green;
255 cached_color_mask_blue = blue;
256 cached_color_mask_alpha = alpha;
Antoine Labour2c1ad962017-10-24 23:32:56257 api()->glColorMaskFn(red, green, blue, alpha);
[email protected]454157e2014-05-03 02:49:45258 }
259
260 inline void SetDeviceDepthMask(GLboolean mask) {
261 if (cached_depth_mask == mask && !ignore_cached_state)
262 return;
263 cached_depth_mask = mask;
Antoine Labour2c1ad962017-10-24 23:32:56264 api()->glDepthMaskFn(mask);
[email protected]454157e2014-05-03 02:49:45265 }
266
267 inline void SetDeviceStencilMaskSeparate(GLenum op, GLuint mask) {
268 if (op == GL_FRONT) {
269 if (cached_stencil_front_writemask == mask && !ignore_cached_state)
270 return;
271 cached_stencil_front_writemask = mask;
272 } else if (op == GL_BACK) {
273 if (cached_stencil_back_writemask == mask && !ignore_cached_state)
274 return;
275 cached_stencil_back_writemask = mask;
276 } else {
277 NOTREACHED();
278 return;
279 }
Antoine Labour2c1ad962017-10-24 23:32:56280 api()->glStencilMaskSeparateFn(op, mask);
[email protected]454157e2014-05-03 02:49:45281 }
282
[email protected]d3eba342013-04-18 21:11:50283 ErrorState* GetErrorState();
284
zmo4c0c3532015-05-22 20:04:48285 void SetBoundBuffer(GLenum target, Buffer* buffer);
286 void RemoveBoundBuffer(Buffer* buffer);
287
zmo773ceaef52016-07-26 05:09:57288 void InitGenericAttribs(GLuint max_vertex_attribs) {
289 attrib_values.resize(max_vertex_attribs);
yunchao.hec4875312016-07-22 16:11:07290
zmo773ceaef52016-07-26 05:09:57291 uint32_t packed_size = max_vertex_attribs / 16;
292 packed_size += (max_vertex_attribs % 16 == 0) ? 0 : 1;
293 generic_attrib_base_type_mask_.resize(packed_size);
294 for (uint32_t i = 0; i < packed_size; ++i) {
295 // All generic attribs are float type by default.
296 generic_attrib_base_type_mask_[i] = 0x55555555u * SHADER_VARIABLE_FLOAT;
297 }
yunchao.hec4875312016-07-22 16:11:07298 }
299
300 void SetGenericVertexAttribBaseType(GLuint index, GLenum base_type) {
zmo773ceaef52016-07-26 05:09:57301 DCHECK_LT(index, attrib_values.size());
yunchao.hec4875312016-07-22 16:11:07302 int shift_bits = (index % 16) * 2;
303 generic_attrib_base_type_mask_[index / 16] &= ~(0x3 << shift_bits);
304 generic_attrib_base_type_mask_[index / 16] |= (base_type << shift_bits);
305 }
306
zmo773ceaef52016-07-26 05:09:57307 const std::vector<uint32_t>& generic_attrib_base_type_mask() const {
308 return generic_attrib_base_type_mask_;
yunchao.hec4875312016-07-22 16:11:07309 }
310
bajones2b98b2a2015-09-15 02:27:36311 void UnbindTexture(TextureRef* texture);
bajones5141d032015-12-07 21:13:39312 void UnbindSampler(Sampler* sampler);
bajones2b98b2a2015-09-15 02:27:36313
zmo2b9c47392015-12-11 02:21:32314 PixelStoreParams GetPackParams();
315 PixelStoreParams GetUnpackParams(Dimension dimension);
316
c.padhib0a7f412017-04-06 06:56:10317 // If a buffer object is bound to PIXEL_PACK_BUFFER, set all pack parameters
318 // user values; otherwise, set them to 0.
319 void UpdatePackParameters() const;
320 // If a buffer object is bound to PIXEL_UNPACK_BUFFER, set all unpack
321 // parameters user values; otherwise, set them to 0.
322 void UpdateUnpackParameters() const;
323
Kai Ninomiyabcbefdab2017-11-03 19:57:27324 void SetMaxWindowRectangles(size_t max);
325 size_t GetMaxWindowRectangles() const;
326 void SetWindowRectangles(GLenum mode,
327 size_t count,
328 const volatile GLint* box);
329 template <typename T>
330 void GetWindowRectangle(GLuint index, T* box) {
331 for (size_t i = 0; i < 4; ++i) {
332 box[i] = window_rectangles_[4 * index + i];
333 }
334 }
335 void UpdateWindowRectangles() const;
336 void UpdateWindowRectanglesForBoundDrawFramebufferClientID(GLuint client_id);
337
zmo0ed71922016-06-23 01:18:42338 void EnableDisableFramebufferSRGB(bool enable);
339
[email protected]f731b9462012-10-30 00:35:22340 #include "gpu/command_buffer/service/context_state_autogen.h"
341
342 EnableFlags enable_flags;
343
[email protected]e259eb412012-10-13 05:47:24344 // Current active texture by 0 - n index.
345 // In other words, if we call glActiveTexture(GL_TEXTURE2) this value would
346 // be 2.
347 GLuint active_texture_unit;
348
[email protected]e259eb412012-10-13 05:47:24349 // The currently bound array buffer. If this is 0 it is illegal to call
350 // glVertexAttribPointer.
[email protected]16ccec12013-02-28 03:40:21351 scoped_refptr<Buffer> bound_array_buffer;
[email protected]e259eb412012-10-13 05:47:24352
zmo4c0c3532015-05-22 20:04:48353 scoped_refptr<Buffer> bound_copy_read_buffer;
354 scoped_refptr<Buffer> bound_copy_write_buffer;
355 scoped_refptr<Buffer> bound_pixel_pack_buffer;
356 scoped_refptr<Buffer> bound_pixel_unpack_buffer;
357 scoped_refptr<Buffer> bound_transform_feedback_buffer;
358 scoped_refptr<Buffer> bound_uniform_buffer;
359
[email protected]e259eb412012-10-13 05:47:24360 // Which textures are bound to texture units through glActiveTexture.
[email protected]1868a342012-11-07 15:56:02361 std::vector<TextureUnit> texture_units;
[email protected]e259eb412012-10-13 05:47:24362
bajones5141d032015-12-07 21:13:39363 // Which samplers are bound to each texture unit;
364 std::vector<scoped_refptr<Sampler>> sampler_units;
365
zmo6c468ba2016-05-04 20:00:51366 // We create a transform feedback as the default one per ES3 enabled context
367 // instead of using GL's default one to make context switching easier.
368 // For other context, we will never change the default transform feedback's
369 // states, so we can just use the GL's default one.
370 scoped_refptr<TransformFeedback> default_transform_feedback;
371
372 scoped_refptr<TransformFeedback> bound_transform_feedback;
373
zmo48ee6d3f2016-05-06 20:33:26374 scoped_refptr<IndexedBufferBindingHost> indexed_uniform_buffer_bindings;
375
[email protected]af6380962012-11-29 23:24:13376 // The values for each attrib.
377 std::vector<Vec4> attrib_values;
378
[email protected]e259eb412012-10-13 05:47:24379 // Class that manages vertex attribs.
[email protected]ed9f9cd2013-02-27 21:12:35380 scoped_refptr<VertexAttribManager> vertex_attrib_manager;
[email protected]81f20a622014-04-18 01:54:52381 scoped_refptr<VertexAttribManager> default_vertex_attrib_manager;
[email protected]e259eb412012-10-13 05:47:24382
383 // The program in use by glUseProgram
[email protected]ed9f9cd2013-02-27 21:12:35384 scoped_refptr<Program> current_program;
[email protected]e259eb412012-10-13 05:47:24385
[email protected]e259eb412012-10-13 05:47:24386 // The currently bound renderbuffer
[email protected]ed9f9cd2013-02-27 21:12:35387 scoped_refptr<Renderbuffer> bound_renderbuffer;
[email protected]8875a5f2014-06-27 08:33:47388 bool bound_renderbuffer_valid;
[email protected]e259eb412012-10-13 05:47:24389
[email protected]e259eb412012-10-13 05:47:24390 bool pack_reverse_row_order;
[email protected]454157e2014-05-03 02:49:45391 bool ignore_cached_state;
[email protected]b3cbad12012-12-05 19:56:36392
zmo8ac3bab2015-04-18 02:30:58393 mutable bool fbo_binding_for_scissor_workaround_dirty;
[email protected]d3eba342013-04-18 21:11:50394
Kai Ninomiyabcbefdab2017-11-03 19:57:27395 GLuint current_draw_framebuffer_client_id = 0;
396
[email protected]d3eba342013-04-18 21:11:50397 private:
zmo8ac3bab2015-04-18 02:30:58398 void EnableDisable(GLenum pname, bool enable) const;
399
zmob730f32b2016-01-06 20:39:08400 void InitStateManual(const ContextState* prev_state) const;
401
ccameronddaa56a2016-12-02 04:05:46402 // EnableDisableFramebufferSRGB is called at very high frequency. Cache the
403 // true value of FRAMEBUFFER_SRGB, if we know it, to elide some of these
404 // calls.
405 bool framebuffer_srgb_valid_ = false;
406 bool framebuffer_srgb_ = false;
zmo0ed71922016-06-23 01:18:42407
yunchao.hec4875312016-07-22 16:11:07408 // Generic vertex attrib base types: FLOAT, INT, or UINT.
409 // Each base type is encoded into 2 bits, the lowest 2 bits for location 0,
zmo773ceaef52016-07-26 05:09:57410 // the highest 2 bits for location (max_vertex_attribs - 1).
yunchao.hec4875312016-07-22 16:11:07411 std::vector<uint32_t> generic_attrib_base_type_mask_;
412
lof84d5e36962016-11-10 00:35:54413 GLfloat line_width_min_ = 0.0f;
414 GLfloat line_width_max_ = 1.0f;
415
Kai Ninomiyabcbefdab2017-11-03 19:57:27416 // Stores the list of N window rectangles as N*4 GLints, like
417 // vector<[x,y,w,h]>. Always has space for MAX_WINDOW_RECTANGLES rectangles.
418 std::vector<GLint> window_rectangles_;
419
Antoine Labour2c1ad962017-10-24 23:32:56420 gl::GLApi* api_ = nullptr;
zmo8ac3bab2015-04-18 02:30:58421 FeatureInfo* feature_info_;
mostynb6682b1c42016-04-19 10:17:30422 std::unique_ptr<ErrorState> error_state_;
[email protected]e259eb412012-10-13 05:47:24423};
424
425} // namespace gles2
426} // namespace gpu
427
428#endif // GPU_COMMAND_BUFFER_SERVICE_CONTEXT_STATE_H_