KhronosGroup / KhronosGroup/SPIRV-Cross

[HLSL] Option for treat all textures as texture arrays.

Open
#1,472 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
GLSL
Stars
2.5k
Forks
713
Avg merge
2d 18h
Merged PRs (30d)
16

Description

d3d does not provide the ability to specify an array slice when creating a non-arrayed texture view from an arrayed texture. If hlsl will treat all textures as texture arrays, the d3d limitation can be bypassed since I can always create an arrayed view with a single array slice:

d3d_view_desc->Dimension = TextureArray;
d3d_view_desc->TextureArray.MostDetailedMip = mip_level;
d3d_view_desc->TextureArray.MipLevels = mip_level_count;
d3d_view_desc->TextureArray.FirstArraySlice = array_slice;
d3d_view_desc->TextureArray.ArraySize = 1;

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 tracing how SPIRV-Cross represents HLSL textures and views, then compare that path with the d3d_view_desc->TextureArray fields described in the issue. Determine the design needed for an option that treats every texture as an array, and define completion as supporting single-slice arrayed views without breaking existing texture handling.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.