Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ShaderTrap back-end to gfauto #1160

Open
1 of 3 tasks
afd opened this issue Sep 14, 2021 · 0 comments
Open
1 of 3 tasks

Add ShaderTrap back-end to gfauto #1160

afd opened this issue Sep 14, 2021 · 0 comments
Labels

Comments

@afd
Copy link
Contributor

afd commented Sep 14, 2021

gfauto is currently geared towards generating Amber tests. It would be useful to give it the ability to generate ShaderTrap tests, in order to be able to test GL and GLES drivers.

Currently gfauto has a fuzz_glsl_test file, which has most of the logic for the fuzzing process, and fuzz_spirv_test, which provides the ability to test using spirv-fuzz. fuzz_spirv_test uses quite a lot of the logic in fuzz_glsl_test.

Adding a ShaderTrap back-end without first refactoring could make things rather messy, so I propose the following pathway:

  • Refactor fuzz_glsl_test and fuzz_spirv_test to call them fuzz_glsl_amber_test and fuzz_spirv_amber_test, extracting any common code into a new fuzz_test_util file, so that neither fuzz_glsl_amber_test nor fuzz_spirv_amber_test depends on the other.
  • Add a ShaderTrap back-end in a new file, fuzz_glsl_shadertrap_test.
  • Assess whether the common code in fuzz_test_util should be common to both the Amber and ShaderTrap back-ends. If it is, no action is required. Otherwise think about having a fuzz_amber_test_util file with the Amber-specific common code.

For now, the ShaderTrap back-end will use the existing .json shader job format.

@paulthomson for info.

@afd afd added the gfauto label Sep 14, 2021
afd added a commit that referenced this issue Sep 14, 2021
Refactors the files that take care of GLSL and SPIR-V fuzzing in
gfauto to (a) make them Amber-specific (paving the way for new
ShaderTrap-related files in the future), and (b) prevent them from
depending on one another by extracting common functionality to a
utilty file.

Also fixes a minor style issue where a variable was named "match",
which was leading to a warning in PyCharm.

Related issue: #1160.
afd added a commit that referenced this issue Sep 14, 2021
Refactors the files that take care of GLSL and SPIR-V fuzzing in
gfauto to (a) make them Amber-specific (paving the way for new
ShaderTrap-related files in the future), and (b) prevent them from
depending on one another by extracting common functionality to a
utilty file.

Also fixes a minor style issue where a variable was named "match",
which was leading to a warning in PyCharm.

Related issue: #1160.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant