| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUND_TYPE_H_ | 5 #ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUND_TYPE_H_ |
| 6 #define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUND_TYPE_H_ | 6 #define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUND_TYPE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "gpu/gpu_export.h" | 10 #include "gpu/gpu_export.h" |
| 11 | 11 |
| 12 #define GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) \ | 12 #define GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) \ |
| 13 GPU_OP(CLEAR_ALPHA_IN_READPIXELS, \ | 13 GPU_OP(CLEAR_ALPHA_IN_READPIXELS, \ |
| 14 clear_alpha_in_readpixels) \ | 14 clear_alpha_in_readpixels) \ |
| 15 GPU_OP(CLEAR_UNIFORMS_BEFORE_PROGRAM_USE, \ | 15 GPU_OP(CLEAR_UNIFORMS_BEFORE_PROGRAM_USE, \ |
| 16 clear_uniforms_before_program_use) \ | 16 clear_uniforms_before_program_use) \ |
| 17 GPU_OP(DELETE_INSTEAD_OF_RESIZE_FBO, \ | 17 GPU_OP(DELETE_INSTEAD_OF_RESIZE_FBO, \ |
| 18 delete_instead_of_resize_fbo) \ | 18 delete_instead_of_resize_fbo) \ |
| 19 GPU_OP(DISABLE_ANGLE_FRAMEBUFFER_MULTISAMPLE, \ | 19 GPU_OP(DISABLE_ANGLE_FRAMEBUFFER_MULTISAMPLE, \ |
| 20 disable_angle_framebuffer_multisample) \ | 20 disable_angle_framebuffer_multisample) \ |
| 21 GPU_OP(DISABLE_DEPTH_TEXTURE, \ | 21 GPU_OP(DISABLE_DEPTH_TEXTURE, \ |
| 22 disable_depth_texture) \ | 22 disable_depth_texture) \ |
| 23 GPU_OP(DISABLE_EXT_DRAW_BUFFERS, \ | 23 GPU_OP(DISABLE_EXT_DRAW_BUFFERS, \ |
| 24 disable_ext_draw_buffers) \ | 24 disable_ext_draw_buffers) \ |
| 25 GPU_OP(DISABLE_EXT_OCCLUSION_QUERY, \ | 25 GPU_OP(DISABLE_EXT_OCCLUSION_QUERY, \ |
| 26 disable_ext_occlusion_query) \ | 26 disable_ext_occlusion_query) \ |
| 27 GPU_OP(DISABLE_OES_STANDARD_DERIVATIVES, \ | 27 GPU_OP(DISABLE_OES_STANDARD_DERIVATIVES, \ |
| 28 disable_oes_standard_derivatives) \ | 28 disable_oes_standard_derivatives) \ |
| 29 GPU_OP(ENABLE_CHROMIUM_FAST_NPOT_MO8_TEXTURES, \ | 29 GPU_OP(ENABLE_CHROMIUM_FAST_NPOT_MO8_TEXTURES, \ |
| 30 enable_chromium_fast_npot_mo8_textures) \ | 30 enable_chromium_fast_npot_mo8_textures) \ |
| 31 GPU_OP(EXIT_ON_CONTEXT_LOST, \ | 31 GPU_OP(EXIT_ON_CONTEXT_LOST, \ |
| 32 exit_on_context_lost) \ | 32 exit_on_context_lost) \ |
| 33 GPU_OP(FLUSH_ON_CONTEXT_SWITCH, \ | 33 GPU_OP(FLUSH_ON_CONTEXT_SWITCH, \ |
| 34 flush_on_context_switch) \ | 34 flush_on_context_switch) \ |
| 35 GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024, \ | 35 GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_1024, \ |
| 36 max_cube_map_texture_size_limit_1024) \ | 36 max_cube_map_texture_size_limit_1024) \ |
| 37 GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_4096, \ | 37 GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_4096, \ |
| 38 max_cube_map_texture_size_limit_4096) \ | 38 max_cube_map_texture_size_limit_4096) \ |
| 39 GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_512, \ | 39 GPU_OP(MAX_CUBE_MAP_TEXTURE_SIZE_LIMIT_512, \ |
| 40 max_cube_map_texture_size_limit_512) \ | 40 max_cube_map_texture_size_limit_512) \ |
| 41 GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \ | 41 GPU_OP(MAX_TEXTURE_SIZE_LIMIT_4096, \ |
| 42 max_texture_size_limit_4096) \ | 42 max_texture_size_limit_4096) \ |
| 43 GPU_OP(NEEDS_GLSL_BUILT_IN_FUNCTION_EMULATION, \ | 43 GPU_OP(NEEDS_GLSL_BUILT_IN_FUNCTION_EMULATION, \ |
| 44 needs_glsl_built_in_function_emulation) \ | 44 needs_glsl_built_in_function_emulation) \ |
| 45 GPU_OP(NEEDS_OFFSCREEN_BUFFER_WORKAROUND, \ | 45 GPU_OP(NEEDS_OFFSCREEN_BUFFER_WORKAROUND, \ |
| 46 needs_offscreen_buffer_workaround) \ | 46 needs_offscreen_buffer_workaround) \ |
| 47 GPU_OP(RESTORE_SCISSOR_ON_FBO_CHANGE, \ | 47 GPU_OP(RESTORE_SCISSOR_ON_FBO_CHANGE, \ |
| 48 restore_scissor_on_fbo_change) \ | 48 restore_scissor_on_fbo_change) \ |
| 49 GPU_OP(REVERSE_POINT_SPRITE_COORD_ORIGIN, \ | 49 GPU_OP(REVERSE_POINT_SPRITE_COORD_ORIGIN, \ |
| 50 reverse_point_sprite_coord_origin) \ | 50 reverse_point_sprite_coord_origin) \ |
| 51 GPU_OP(SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP, \ | 51 GPU_OP(SET_TEXTURE_FILTER_BEFORE_GENERATING_MIPMAP, \ |
| 52 set_texture_filter_before_generating_mipmap) \ | 52 set_texture_filter_before_generating_mipmap) \ |
| 53 GPU_OP(UNBIND_FBO_ON_CONTEXT_SWITCH, \ | 53 GPU_OP(UNBIND_FBO_ON_CONTEXT_SWITCH, \ |
| 54 unbind_fbo_on_context_switch) \ | 54 unbind_fbo_on_context_switch) \ |
| 55 GPU_OP(USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS, \ | 55 GPU_OP(USE_CLIENT_SIDE_ARRAYS_FOR_STREAM_BUFFERS, \ |
| 56 use_client_side_arrays_for_stream_buffers) \ | 56 use_client_side_arrays_for_stream_buffers) \ |
| 57 GPU_OP(USE_CURRENT_PROGRAM_AFTER_SUCCESSFUL_LINK, \ | 57 GPU_OP(USE_CURRENT_PROGRAM_AFTER_SUCCESSFUL_LINK, \ |
| 58 use_current_program_after_successful_link) | 58 use_current_program_after_successful_link) \ |
| 59 GPU_OP(USE_NON_ZERO_SIZE_FOR_CLIENT_SIDE_STREAM_BUFFERS, \ |
| 60 use_non_zero_size_for_client_side_stream_buffers) \ |
| 59 | 61 |
| 60 namespace gpu { | 62 namespace gpu { |
| 61 | 63 |
| 62 // Provides all types of GPU driver bug workarounds. | 64 // Provides all types of GPU driver bug workarounds. |
| 63 enum GPU_EXPORT GpuDriverBugWorkaroundType { | 65 enum GPU_EXPORT GpuDriverBugWorkaroundType { |
| 64 #define GPU_OP(type, name) type, | 66 #define GPU_OP(type, name) type, |
| 65 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) | 67 GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP) |
| 66 #undef GPU_OP | 68 #undef GPU_OP |
| 67 NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES | 69 NUMBER_OF_GPU_DRIVER_BUG_WORKAROUND_TYPES |
| 68 }; | 70 }; |
| 69 | 71 |
| 70 GPU_EXPORT std::string GpuDriverBugWorkaroundTypeToString( | 72 GPU_EXPORT std::string GpuDriverBugWorkaroundTypeToString( |
| 71 GpuDriverBugWorkaroundType type); | 73 GpuDriverBugWorkaroundType type); |
| 72 | 74 |
| 73 } // namespace gpu | 75 } // namespace gpu |
| 74 | 76 |
| 75 #endif // GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUND_TYPE_H_ | 77 #endif // GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUND_TYPE_H_ |
| 76 | 78 |
| OLD | NEW |