Skip to content

Fix conversion of texture addressing mode#2229

Closed
ex-rzr wants to merge 1 commit into
ROCm:mainfrom
ex-rzr:fix_texture_addressing_mode
Closed

Fix conversion of texture addressing mode#2229
ex-rzr wants to merge 1 commit into
ROCm:mainfrom
ex-rzr:fix_texture_addressing_mode

Conversation

@ex-rzr

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

Copy link
Copy Markdown
Contributor

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

mangupta commented Aug 5, 2021

Copy link
Copy Markdown
Contributor

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
brechtvl pushed a commit to brechtvl/cycles that referenced this pull request Jun 26, 2024
JeniferC99 pushed a commit to ROCm/clr that referenced this pull request May 4, 2026
hipAddressModeClamp corresponds to CL_ADDRESS_CLAMP_TO_EDGE.
This change fixes incorrect sampling near texture edges.

ROCm/hip#2229

Change-Id: Ia2af9f3cb582a74af7b1f65bad1ed0310eab2628


[ROCm/clr commit: bcdfb01]
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.

3 participants