o3de / o3de-azslc

Amazon Shader Language (AZSL) Compiler
Other
23 stars 14 forks source link

Support multiple unbounded arrays within a single SRG #25

Open jeremyong-az opened 2 years ago

jeremyong-az commented 2 years ago

DX12 binding semantics assign a register to each binding in an array and do not permit overlap. Spaces act as a "namespace" to permit multiple unbounded arrays to be present in a shader. Instead of restricting unbounded array use within an SRG, this change modifies the space assignment strategy. Unbounded arrays (on platforms that require it, DX12 in this case) are designated a unique space, starting from 1000 and counting up. This "spill space" is orthogonal to the space assignment corresponding with the SRG frequency.

jeremyong-az commented 2 years ago

A change is needed to correct tests that expect an error with multiple unbounded arrays present.

jeremyong-az commented 2 years ago

@galibzon None as of yet, although a file was added to act as the test once written. The thing that needs to be done first before this PR can be merged is fixing tests that were broken because limits that existed previously are now lifted.

galibzon commented 2 years ago

@jeremyong-az , also it's important to highlight that azslc follows the exact same workflow as o3de. o3de/o3de-azslc is upstream, aws-lumberyard-dev/o3de-azslc is origin. So the PR should come from aws-lumberyard-dev/o3de-azslc.

jeremyong-az commented 2 years ago

@galibzon I did not have permissions to aws-lumberyard-dev/o3de-azslc when this PR was created.

moudgils commented 2 years ago

Let me move this pr to the correct repo, address the failing tests and maybe add a new one to test the new changes.