-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(fuzzer): implement usage of OpExtension, OpExtInstImport and OpE…
…xtInst; modify fuzzer logic to include the GLSL extension
- Loading branch information
Showing
13 changed files
with
272 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,33 @@ | ||
from typing import TYPE_CHECKING | ||
|
||
from src import OpCode | ||
from src import ReparametrizationError | ||
from src import Statement | ||
from src import Type | ||
from src import VoidOp | ||
from utils.patched_dataclass import dataclass | ||
|
||
if TYPE_CHECKING: | ||
from src.context import Context | ||
|
||
|
||
class OpExtension(OpCode): | ||
name: str | ||
@dataclass | ||
class OpExtension(OpCode, VoidOp): | ||
name: str = None | ||
|
||
|
||
@dataclass | ||
class OpExtInstImport(OpCode): | ||
name: str = None | ||
|
||
|
||
# @dataclass | ||
# class OpExtInst(OpCode): | ||
# name: str | ||
# def get_required_capabilities(self) -> list[Capability]: | ||
# return [] | ||
@dataclass | ||
class OpExtInst(Statement): | ||
type: Type = None | ||
extension_set: OpExtInstImport = None | ||
instruction: OpCode = None | ||
operands: tuple[Statement] = None | ||
|
||
def fuzz(self, context: "Context") -> list[OpCode]: | ||
Statement.set_zero_probability(self.__class__) | ||
raise ReparametrizationError |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.