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

Fix conversion of texture addressing mode #2229

Closed
wants to merge 1 commit into from

Conversation

ex-rzr
Copy link
Contributor

@ex-rzr ex-rzr commented Feb 1, 2021

hipAddressModeClamp corresponds to CL_ADDRESS_CLAMP_TO_EDGE.
This change fixes incorrect sampling near texture edges.

https://www.khronos.org/registry/OpenCL/sdk/1.2/docs/man/xhtml/sampler_t.html

CLK_ADDRESS_CLAMP_TO_EDGE - out-of-range image coordinates are clamped to the extent.
CLK_ADDRESS_CLAMP - out-of-range image coordinates will return a border color. This is similar to the GL_ADDRESS_CLAMP_TO_BORDER addressing mode.

https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html#group__CUDART__TYPES_1g03e1bbd2c491d809279c7a47e2cd0351

cudaAddressModeClamp = 1
Clamp to edge address mode
cudaAddressModeBorder = 3
Border address mode

hipAddressModeClamp corresponds to CL_ADDRESS_CLAMP_TO_EDGE.
This change fixes incorrect sampling near texture edges.
gargrahul pushed a commit that referenced this pull request Jul 27, 2021
hipAddressModeClamp corresponds to CL_ADDRESS_CLAMP_TO_EDGE.
This change fixes incorrect sampling near texture edges.

#2229

Change-Id: Ia2af9f3cb582a74af7b1f65bad1ed0310eab2628
@mangupta mangupta closed this Aug 5, 2021
@mangupta mangupta reopened this Aug 5, 2021
@mangupta
Copy link
Contributor

mangupta commented Aug 5, 2021

Closing all existing pull requests that do not target the develop branch. In case this pull request is still valid, please rebase your changes against develop branch and resubmit.

@mangupta mangupta closed this Aug 5, 2021
hubot pushed a commit to blender/blender that referenced this pull request Feb 29, 2024
hubot pushed a commit to blender/blender that referenced this pull request Mar 12, 2024
hubot pushed a commit to blender/blender that referenced this pull request Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants