Skip to content

Commit

Permalink
Revert "Add scaffolding for structured GPU command buffer fuzzer"
Browse files Browse the repository at this point in the history
This reverts commit 8afc180.

Reason for revert: broke build on GPU FYI Win x64 debug builder:
https://ci.chromium.org/p/chromium/builders/ci/GPU%20FYI%20Win%20x64%20Builder%20(dbg)/13152?blamelist=1#blamelist-tab

Original change's description:
> Add scaffolding for structured GPU command buffer fuzzer
> 
> This CL contains a basic fuzzer for WebGL shaders that shows some
> essential design ideas:
> 
> 1) a protobuf spec defines how shaders will be generated
> 2) conversion from protobuf message to shader string is
>    provided in its own library that has unit tests
> 3) we add a basic fuzzer to compile shader programs using libANGLE
> 
> This is by no means complete and serves as a foundation for the fuzzer
> so subsequent CLs will be easier to review. Later CLs will slowly complete
> the core grammar for GLSL before incorporating some more complex testcases
> from the Khronos compliance suite.
> 
> BUG=900487
> 
> Change-Id: I67df52a73926d22637afad9a966790f34011175c
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1623556
> Commit-Queue: Ned Williamson <nedwill@google.com>
> Reviewed-by: Peter Kasting <pkasting@chromium.org>
> Reviewed-by: Kenneth Russell <kbr@chromium.org>
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#662832}

TBR=pkasting@chromium.org,kbr@chromium.org,piman@chromium.org,xyzzyz@chromium.org,nedwill@google.com

Change-Id: I91debbc67cebc46ecdcaa06b6b1cf587fae781f1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 900487
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1627825
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662929}
  • Loading branch information
kenrussell authored and Commit Bot committed May 24, 2019
1 parent 909d183 commit 965db51
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 772 deletions.
63 changes: 0 additions & 63 deletions gpu/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import("//build/config/jumbo.gni")
import("//build/config/ui.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
import("//third_party/protobuf/proto_library.gni")
import("//ui/gl/features.gni")

config("gpu_implementation") {
Expand Down Expand Up @@ -197,68 +196,6 @@ jumbo_static_library("test_support") {
]
}

if (!is_android && !is_fuchsia) {
proto_library("gl_lpm_fuzzer_proto") {
sources = [
"command_buffer/tests/lpm/gl_lpm_fuzzer.proto",
]
}

static_library("gl_lpm_shader_to_string") {
sources = [
"command_buffer/tests/lpm/gl_lpm_shader_to_string.cc",
"command_buffer/tests/lpm/gl_lpm_shader_to_string.h",
]

deps = [
":gl_lpm_fuzzer_proto",
"//base:base",
]
}

test("gl_lpm_shader_to_string_unittest") {
sources = [
"command_buffer/tests/lpm/gl_lpm_shader_to_string_unittest.cc",
]

deps = [
":gl_lpm_shader_to_string",
"//base/test:run_all_unittests",
"//testing/gtest",
"//third_party/protobuf:protobuf_full",
]
}

fuzzer_test("gl_lpm_fuzzer") {
sources = [
"command_buffer/tests/gl_manager.cc",
"command_buffer/tests/gl_manager.h",
"command_buffer/tests/gl_test_utils.cc",
"command_buffer/tests/gl_test_utils.h",
"command_buffer/tests/lpm/gl_lpm_fuzzer.cc",
]

defines = [ "GL_GLEXT_PROTOTYPES" ]

deps = [
":gl_lpm_fuzzer_proto",
":gl_lpm_shader_to_string",
":gles2",
":test_support",
"//gpu/command_buffer/client:gles2_c_lib",
"//gpu/command_buffer/client:gles2_implementation",
"//gpu/command_buffer/common:gles2_utils",
"//gpu/ipc:gl_in_process_context",
"//gpu/ipc/service:service",
"//testing/gtest:gtest",
"//third_party/libprotobuf-mutator",
"//ui/gfx:gfx",
"//ui/gl:gl",
"//ui/gl/init:init",
]
}
}

test("gl_tests") {
sources = [
"command_buffer/service/shared_image_backing_factory_gl_texture_unittest.cc",
Expand Down
2 changes: 1 addition & 1 deletion gpu/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include_rules = [
"+third_party/re2",
"+third_party/smhasher",
"+third_party/swiftshader",
"+third_party/protobuf",
"+third_party/protbuf",
"+third_party/zlib",
"+crypto",
"+ui/gfx",
Expand Down
18 changes: 9 additions & 9 deletions gpu/command_buffer/tests/gl_test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,14 @@ bool GLTestHelper::HasExtension(const char* extension) {
}

bool GLTestHelper::CheckGLError(const char* msg, int line) {
bool success = true;
GLenum error = GL_NO_ERROR;
while ((error = glGetError()) != GL_NO_ERROR) {
success = false;
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), error)
<< "GL ERROR in " << msg << " at line " << line << " : " << error;
}
return success;
bool success = true;
GLenum error = GL_NO_ERROR;
while ((error = glGetError()) != GL_NO_ERROR) {
success = false;
EXPECT_EQ(static_cast<GLenum>(GL_NO_ERROR), error)
<< "GL ERROR in " << msg << " at line " << line << " : " << error;
}
return success;
}

GLuint GLTestHelper::CompileShader(GLenum type, const char* shaderSrc) {
Expand Down Expand Up @@ -277,7 +277,7 @@ struct BitmapInfoHeader{
uint8_t clr_important[4];
};

} // namespace
}

bool GLTestHelper::SaveBackbufferAsBMP(
const char* filename, int width, int height) {
Expand Down
168 changes: 0 additions & 168 deletions gpu/command_buffer/tests/lpm/gl_lpm_fuzzer.cc

This file was deleted.

Loading

0 comments on commit 965db51

Please sign in to comment.