Skip to content

Conversation

@luciechoi
Copy link
Collaborator

@luciechoi luciechoi commented Jan 7, 2026

Part of #7979

  • Add SampledTexture2D resource type in the vk namespace.
  • Add .Sample(float2 location) method.
  • Add default type parameter float4.
  • Allow optional arguments int2 offset, float clamp, uint status.
  • Add .CalculateLevelOfDetail(float2 location) method.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

✅ With the latest revision this PR passed the C/C++ code formatter.

@luciechoi luciechoi marked this pull request as draft January 7, 2026 09:03
Copy link
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a reasonable direction. There are some issues that we need to figure out how to handle.

@luciechoi luciechoi force-pushed the sampledtexture2d branch 3 times, most recently from 67fef39 to 8030b4e Compare January 8, 2026 04:56
@luciechoi luciechoi marked this pull request as ready for review January 8, 2026 05:03
@luciechoi
Copy link
Collaborator Author

Thanks for the early review! I've updated the method to take in optional arguments.

@luciechoi luciechoi requested a review from s-perron January 8, 2026 05:06
@luciechoi luciechoi changed the title [SPIR-V] Add vk::SampledTexture2D resource type and .Sample() method. [SPIR-V] Add vk::SampledTexture2D resource type and .Sample(), CalculateLevelOfDetail() method. Jan 9, 2026
@luciechoi luciechoi changed the title [SPIR-V] Add vk::SampledTexture2D resource type and .Sample(), CalculateLevelOfDetail() method. [SPIR-V] Add vk::SampledTexture2D resource type and .Sample(), .CalculateLevelOfDetail() method. Jan 9, 2026
@damyanp
Copy link
Member

damyanp commented Jan 12, 2026

If this is worth mentioning in the release notes, please add something to https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/ReleaseNotes.md as appropriate.

Copy link
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good to me. A few minor code style issues to fix up.

@s-perron s-perron requested a review from llvm-beanz January 18, 2026 01:11
@s-perron
Copy link
Collaborator

If this is worth mentioning in the release notes, please add something to https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/ReleaseNotes.md as appropriate.

It will not be fully completed for this release. We should mention it in the next.

@luciechoi luciechoi requested a review from s-perron January 22, 2026 22:19
@luciechoi luciechoi force-pushed the sampledtexture2d branch 3 times, most recently from fae5ab0 to aead4cc Compare January 22, 2026 22:25
Copy link
Collaborator

@s-perron s-perron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good now. Just one minor change.

@luciechoi luciechoi requested a review from bogner January 26, 2026 18:06
@luciechoi luciechoi requested review from bogner and s-perron January 27, 2026 17:34
Copy link
Collaborator

@bogner bogner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple minor comments but otherwise LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

4 participants