How to open lod clamp specified in shader in glsl?

77 Views Asked by At

amd instruction set spec said:

IMAGE_SAMPLE_D_CL_O SAMPLE_O, with LOD clamp specified in shader, with user derivatives.
IMAGE_SAMPLE_D_CL sample texture map, with LOD clamp specified in shader, with user derivatives.
IMAGE_SAMPLE_D sample texture map, with user derivatives
IMAGE_SAMPLE_CL sample texture map, with LOD clamp specified in shader.

in vulkan, i use textureGrad in glsl. Running on radeon, i got a image_sample_d in asm

How to get image_sapmle_d_cl in vulkan or opengl?

In other words, how to open LOD clamp specified in shader, as the spec said.

1

There are 1 best solutions below

0
Lucas On BEST ANSWER

@vandench‘s comment solved this:

I'm not sure if it's supported by AMD, but there is ARB_sparse_texture_clamp which adds textureGradClampARB in addition to the sparse samplers it adds.