Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0011] Get the vk::SpirvType or vk::SpirvOpaqueType of an expression #241

Open
devshgraphicsprogramming opened this issue May 17, 2024 · 1 comment
Labels
active proposal Issues relating to active proposals
Milestone

Comments

@devshgraphicsprogramming
Copy link

devshgraphicsprogramming commented May 17, 2024

Which proposal does this relate to?
0011-inline-spirv.md

Describe the issue or outstanding question.
Banging my head against the wall trying to make Combined Sampler Images, or PhysicalStoragePointers (BDA) using types that are not "wholly build from ground up with vk::SpirvType"

For example I have

struct MyAggregate
{
   int32_t a,b;
};

For a regular vk::RawBufferLoad or a StructuredBuffer, DXC seems to make some meta-types that don't match vk::SpirvType<..,T> I'd make myself.

This gets in the way of doing OpAccessChain or similar things, because the types don't have the same %result_id from an OpType.. even though the types may be identically defined.

Additional context
I've outlined list of vastly different currently open DXC issues that may touch upon this here:
microsoft/DirectXShaderCompiler#6578 (comment)

I'd also settle for getting the vk::spirvType of a type instead of an expression, this would be enough to e.g. have the exact same type that a Texture2D is using, or getting the basic MyAggregate typedef to make pointers out of.

This seems to be the final stumbling block (first being that the offsetof member decorations seem to just simply not work) for me to implement the equivalent of Proposal 0010 in user-space while also addressing #57

@devshgraphicsprogramming devshgraphicsprogramming added the active proposal Issues relating to active proposals label May 17, 2024
@damyanp damyanp moved this to For Google in HLSL Triage Aug 13, 2024
@s-perron s-perron added this to the Dormant milestone Sep 4, 2024
@s-perron
Copy link
Collaborator

s-perron commented Sep 4, 2024

I don't think we need anything new in HLSL to handle this. The issue is the compiler implementation. The errors can vary depending on the situation. Some times there are issues with the compiler duplicating types in the spir-v. We have a solution for that with pointers. This will be harder with structs.

Another problem is how to specify the layout. There is no good solution for that in DXC.

We will leave this open to remind us of this when implementing inline spir-v in clang.

@s-perron s-perron moved this from For Google to Triaged in HLSL Triage Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active proposal Issues relating to active proposals
Projects
Status: No status
Status: Triaged
Development

No branches or pull requests

4 participants