microsoft / microsoft/DirectXShaderCompiler

Bad entries in g_uBasicKindProps table in SemaHLSL.cpp

Open
#7,293 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug tech-debt
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

When looking at the g_uBasicKindProps property table in SemaHLSL.cpp, I noticed some erroneous entries. I think these got in here because they weren't really causing any bad behavior, but I don't think they should stay this way.

  • Some property entries have LICOMPTYPE_* values. This is definitely wrong! That will result in some combination of bits that could trigger some bad weird corner case behavior when used in a particular way.
    • This includes the recent LICOMPTYPE_HIT_OBJECT addition, which should have BPROP_OBJECT.
    • AR_OBJECT_ACCELERATION_STRUCT should have BPROP_OBJECT
    • AR_OBJECT_RAY_DESC and AR_OBJECT_USER_DEFINED_TYPE should probably be 0, like AR_OBJECT_TRIANGLE_INTERSECTION_ATTRIBUTES. Also, the "OBJECT" in the name is probably not appropriate.
  • Subobjects should be identified with at least BPROP_OBJECT.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open SemaHLSL.cpp and inspect the g_uBasicKindProps table, focusing on the LICOMPTYPE_* entries, the listed AR_OBJECT values, and subobjects. Compare those entries with the surrounding property conventions. Done means the erroneous LICOMPTYPE_* flags are corrected, applicable subobjects include BPROP_OBJECT, and the questionable object classifications or names are resolved consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.