Commit c71ee1b
committed
Check unified/resource heap-stride conflict at option-parse time (#11723)
Per review (@jkwak-work): diagnose the `-spirv-unified-descriptor-heap-stride` /
non-zero `-spirv-resource-heap-stride` mutual exclusivity in OptionsParser's post-parse
validation (alongside ConflictingProfilesSpecifiedForTarget / ConflictingStagesForEntryPoint),
reading both from linkage->m_optionSet, so E57006 fires as soon as the options are parsed --
before any SPIR-V emission and regardless of whether the module declares a resource heap.
An explicit `-spirv-resource-heap-stride 0` selects the default OpConstantSizeOfEXT path
the unified option modifies and is accepted.
Keep diagnoseConflictingDescriptorHeapStrideOptions() at emit time as the compile-API
safety net: SPIRVResourceHeapStride / SPIRVUnifiedDescriptorHeapStride are public API
options, and entries set directly through the compile API do not flow through OptionsParser,
so without the emit-time check that path would silently honor the explicit stride. The two
do not double-diagnose: an E57006 at parse time aborts before emission, so the emit-time
check only fires for the API path.
CONFLICT test variant still produces error[E57006]; build + 4/4 static tests + spirv-val
EXIT=0 for both entries green.1 parent 893f8cc commit c71ee1b
2 files changed
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7175 | 7175 | | |
7176 | 7176 | | |
7177 | 7177 | | |
7178 | | - | |
7179 | | - | |
7180 | | - | |
| 7178 | + | |
| 7179 | + | |
| 7180 | + | |
| 7181 | + | |
7181 | 7182 | | |
7182 | 7183 | | |
7183 | 7184 | | |
| |||
7309 | 7310 | | |
7310 | 7311 | | |
7311 | 7312 | | |
7312 | | - | |
7313 | | - | |
7314 | | - | |
7315 | | - | |
| 7313 | + | |
| 7314 | + | |
| 7315 | + | |
| 7316 | + | |
| 7317 | + | |
| 7318 | + | |
| 7319 | + | |
7316 | 7320 | | |
7317 | 7321 | | |
7318 | 7322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4277 | 4277 | | |
4278 | 4278 | | |
4279 | 4279 | | |
| 4280 | + | |
| 4281 | + | |
| 4282 | + | |
| 4283 | + | |
| 4284 | + | |
| 4285 | + | |
| 4286 | + | |
| 4287 | + | |
| 4288 | + | |
| 4289 | + | |
| 4290 | + | |
| 4291 | + | |
4280 | 4292 | | |
4281 | 4293 | | |
4282 | 4294 | | |
| |||
0 commit comments