KhronosGroup / KhronosGroup/glslang

Please support HLSL SV_Barycentrics semantic

Open
#3,068 0 comments 0 reactions 0 assignees View on GitHub
enhancement HLSL SPIR-V
Dominant language
C++
Stars
3.6k
Forks
989
Avg merge
1d 2h
Merged PRs (30d)
31

Description

I tried to add this support myself but I always hit a wall

I'm targeting SPIR-V code using those extensions:

```
VK_KHR_fragment_shader_barycentric
SPV_KHR_fragment_shader_barycentric
```

and capability:

`FragmentBarycentricKHR`

I patched this file hoping for it to work but it doesn't:

hlslScanContext.cpp
```
(*SemanticMap)["SV_DEPTHGREATEREQUAL"] = EbvFragDepthGreater;
(*SemanticMap)["SV_DEPTHLESSEQUAL"] = EbvFragDepthLesser;
(*SemanticMap)["SV_STENCILREF"] = EbvFragStencilRef;
(*SemanticMap)["SV_BARYCENTRICS"] = EbvBaryCoordEXT;
}

void HlslScanContext::deleteKeywordMap()
```

Contributor guide

Open the contributing guide

Research direction

Start in hlslScanContext.cpp, where HLSL semantics are mapped, and trace how the mapped semantic is lowered for SPIR-V. Check the generated SPIR-V against the requested VK_KHR_fragment_shader_barycentric and SPV_KHR_fragment_shader_barycentric extensions and FragmentBarycentricKHR capability. Done means SV_Barycentrics is accepted and produces the intended SPIR-V output.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.