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

Side by Side Diff: gpu/config/gpu_info_collector_unittest.cc

Issue 1481523003: Check gl version before querying GL_MAX_SAMPLES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « gpu/config/gpu_info_collector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // 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 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 #include "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/strings/string_split.h" 6 #include "base/strings/string_split.h"
7 #include "gpu/config/gpu_info.h" 7 #include "gpu/config/gpu_info.h"
8 #include "gpu/config/gpu_info_collector.h" 8 #include "gpu/config/gpu_info_collector.h"
9 #include "testing/gmock/include/gmock/gmock.h" 9 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 test_values_.gpu.device_id = 0; // not implemented 57 test_values_.gpu.device_id = 0; // not implemented
58 test_values_.driver_vendor = ""; // not implemented 58 test_values_.driver_vendor = ""; // not implemented
59 test_values_.driver_version = "14.0"; 59 test_values_.driver_version = "14.0";
60 test_values_.pixel_shader_version = "1.00"; 60 test_values_.pixel_shader_version = "1.00";
61 test_values_.vertex_shader_version = "1.00"; 61 test_values_.vertex_shader_version = "1.00";
62 test_values_.gl_renderer = "Adreno (TM) 320"; 62 test_values_.gl_renderer = "Adreno (TM) 320";
63 test_values_.gl_vendor = "Qualcomm"; 63 test_values_.gl_vendor = "Qualcomm";
64 test_values_.gl_version = "OpenGL ES 2.0 V@14.0 AU@04.02 (CL@3206)"; 64 test_values_.gl_version = "OpenGL ES 2.0 V@14.0 AU@04.02 (CL@3206)";
65 test_values_.gl_extensions = 65 test_values_.gl_extensions =
66 "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " 66 "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 "
67 "GL_EXT_read_format_bgra"; 67 "GL_EXT_read_format_bgra GL_EXT_multisampled_render_to_texture";
68 gl_shading_language_version_ = "1.00"; 68 gl_shading_language_version_ = "1.00";
69 break; 69 break;
70 } 70 }
71 case kMockedLinux: { 71 case kMockedLinux: {
72 test_values_.gpu.vendor_id = 0x10de; 72 test_values_.gpu.vendor_id = 0x10de;
73 test_values_.gpu.device_id = 0x0658; 73 test_values_.gpu.device_id = 0x0658;
74 test_values_.driver_vendor = "NVIDIA"; 74 test_values_.driver_vendor = "NVIDIA";
75 test_values_.driver_version = "195.36.24"; 75 test_values_.driver_version = "195.36.24";
76 test_values_.pixel_shader_version = "1.50"; 76 test_values_.pixel_shader_version = "1.50";
77 test_values_.vertex_shader_version = "1.50"; 77 test_values_.vertex_shader_version = "1.50";
(...skipping 11 matching lines...) Expand all
89 test_values_.gpu.device_id = 0x0640; 89 test_values_.gpu.device_id = 0x0640;
90 test_values_.driver_vendor = ""; // not implemented 90 test_values_.driver_vendor = ""; // not implemented
91 test_values_.driver_version = "1.6.18"; 91 test_values_.driver_version = "1.6.18";
92 test_values_.pixel_shader_version = "1.20"; 92 test_values_.pixel_shader_version = "1.20";
93 test_values_.vertex_shader_version = "1.20"; 93 test_values_.vertex_shader_version = "1.20";
94 test_values_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine"; 94 test_values_.gl_renderer = "NVIDIA GeForce GT 120 OpenGL Engine";
95 test_values_.gl_vendor = "NVIDIA Corporation"; 95 test_values_.gl_vendor = "NVIDIA Corporation";
96 test_values_.gl_version = "2.1 NVIDIA-1.6.18"; 96 test_values_.gl_version = "2.1 NVIDIA-1.6.18";
97 test_values_.gl_extensions = 97 test_values_.gl_extensions =
98 "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 " 98 "GL_OES_packed_depth_stencil GL_EXT_texture_format_BGRA8888 "
99 "GL_EXT_read_format_bgra"; 99 "GL_EXT_read_format_bgra GL_EXT_framebuffer_multisample";
100 gl_shading_language_version_ = "1.20 "; 100 gl_shading_language_version_ = "1.20 ";
101 break; 101 break;
102 } 102 }
103 case kMockedWindows: { 103 case kMockedWindows: {
104 test_values_.gpu.vendor_id = 0x10de; 104 test_values_.gpu.vendor_id = 0x10de;
105 test_values_.gpu.device_id = 0x0658; 105 test_values_.gpu.device_id = 0x0658;
106 test_values_.driver_vendor = ""; // not implemented 106 test_values_.driver_vendor = ""; // not implemented
107 test_values_.driver_version = ""; 107 test_values_.driver_version = "";
108 test_values_.pixel_shader_version = "1.40"; 108 test_values_.pixel_shader_version = "1.40";
109 test_values_.vertex_shader_version = "1.40"; 109 test_values_.vertex_shader_version = "1.40";
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 gpu_info.gl_renderer = kTestStrings[i].gl_renderer; 297 gpu_info.gl_renderer = kTestStrings[i].gl_renderer;
298 gpu_info.gl_vendor = kTestStrings[i].gl_vendor; 298 gpu_info.gl_vendor = kTestStrings[i].gl_vendor;
299 gpu_info.gl_version = kTestStrings[i].gl_version; 299 gpu_info.gl_version = kTestStrings[i].gl_version;
300 EXPECT_EQ(CollectDriverInfoGL(&gpu_info), kCollectInfoSuccess); 300 EXPECT_EQ(CollectDriverInfoGL(&gpu_info), kCollectInfoSuccess);
301 EXPECT_EQ(gpu_info.driver_version, kTestStrings[i].expected_driver_version); 301 EXPECT_EQ(gpu_info.driver_version, kTestStrings[i].expected_driver_version);
302 } 302 }
303 } 303 }
304 304
305 } // namespace gpu 305 } // namespace gpu
306 306
OLDNEW
« no previous file with comments | « gpu/config/gpu_info_collector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698