NVIDIA-RTX / NVIDIA-RTX/ShaderMake

[RFE] Blobs should include permutations for all containers, participated into compilation

Open
#13 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
118
Forks
38
PR merge metrics
No merged PRs in 30d

Description

Currently a blob contains all permutations per container (DXBC, DXIL, SPIRV). It would be good to store all containers in one blob to simplify this use case:

bool shaderMakeResult = false;
#if ENABLE_D3D11_SUPPORT
    if (graphicsAPI == D3D11)
        shaderMakeResult = ShaderMake::FindPermutationInBlob(dxbcBlob, dxbcBlobSize, defines, defineNum, &bytecode, &size);
#endif
#if ENABLE_D3D12_SUPPORT
    if (graphicsAPI == D3D12)
        shaderMakeResult = ShaderMake::FindPermutationInBlob(dxilBlob, dxilBlobSize, defines, defineNum, &bytecode, &size);
#endif
#if ENABLE_VK_SUPPORT
    if (graphicsAPI == VK)
        shaderMakeResult = ShaderMake::FindPermutationInBlob(spirvBlob, spirvBlobSize, defines, defineNum, &bytecode, &size);
#endif

To something like:

bool shaderMakeResult = ShaderMake::FindPermutationInBlob(graphicsAPI, blob, blobSize, defines, defineNum, &bytecode, &size);

Contributor guide

No contributing guide indexed for this repository

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

Start by locating FindPermutationInBlob and the code that serializes blobs and permutations for DXBC, DXIL, and SPIR-V. Trace how the graphics API and container are currently selected; done means one blob can hold all containers and FindPermutationInBlob can select the appropriate one through the graphicsAPI argument.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.