rayanht/SPIRVSmith

System-wide spirv executables used instead of the ones installed from scripts

AaronGhost opened this issue · 0 comments

Heya,

I was trying to run this on my computer and I am unsure if I need to install the spirv dependencies through the provided scripts or using my packet manager. It seems like some of the spirv executable files are picked from the system and some others from the installation script location. I am unsure if that is an intended behavior.

It also seems that the designated location for the install script (bin/) does not match the location in which the executable files are installed (bin/installed/bin)

System-wide:

def assemble_spasm_file(infile_path: str, outfile_path: str) -> SubprocessResult:
process: subprocess.CompletedProcess = subprocess.run(
[
"spirv-as",
"--target-env",
TARGET_SPIRV_VERSION,
infile_path,
"-o",
outfile_path,
],

def disassemble_spv_file(spv_path: str, outfile_path: str, silent: bool = False):
process: subprocess.CompletedProcess = subprocess.run(
[
"spirv-dis",
"--no-indent",
"--raw-id",
"-o",
outfile_path,
spv_path,
],

def validate_spv_file(
filename: str,
) -> SubprocessResult:
process: subprocess.CompletedProcess = subprocess.run(
[
"spirv-val",
"--target-env",
TARGET_SPIRV_VERSION,
filename,
],

Dependency configuration:

def optimise_spv_file(shader: SPIRVShader, filename: str) -> bool:
process: subprocess.CompletedProcess = subprocess.run(
[
shader.context.config.binaries.OPTIMISER_PATH,
f"--target-env={TARGET_SPIRV_VERSION}",
filename,
"-o",
f"out/{shader.id}/spv_opt/shader.spv",
],