mesa: move is_wrap_gl_clamp() to samplerobj.h and deduplicate
Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17459>
This commit is contained in:
parent
56e5eaeba1
commit
c17bfc5309
|
@ -532,12 +532,6 @@ flush(struct gl_context *ctx)
|
|||
#define INVALID_PNAME 0x101
|
||||
#define INVALID_VALUE 0x102
|
||||
|
||||
static inline GLboolean
|
||||
is_wrap_gl_clamp(GLint param)
|
||||
{
|
||||
return param == GL_CLAMP || param == GL_MIRROR_CLAMP_EXT;
|
||||
}
|
||||
|
||||
static GLuint
|
||||
set_sampler_wrap_s(struct gl_context *ctx, struct gl_sampler_object *samp,
|
||||
GLint param)
|
||||
|
|
|
@ -183,6 +183,12 @@ _mesa_lower_gl_clamp(struct gl_context *ctx, struct gl_sampler_object *samp)
|
|||
}
|
||||
}
|
||||
|
||||
static inline GLboolean
|
||||
is_wrap_gl_clamp(GLint param)
|
||||
{
|
||||
return param == GL_CLAMP || param == GL_MIRROR_CLAMP_EXT;
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -248,12 +248,6 @@ _mesa_target_allows_setting_sampler_parameters(GLenum target)
|
|||
}
|
||||
|
||||
|
||||
static inline GLboolean
|
||||
is_wrap_gl_clamp(GLint param)
|
||||
{
|
||||
return param == GL_CLAMP || param == GL_MIRROR_CLAMP_EXT;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set an integer-valued texture parameter
|
||||
* \return GL_TRUE if legal AND the value changed, GL_FALSE otherwise
|
||||
|
|
|
@ -72,13 +72,6 @@ get_texture_index(struct gl_context *ctx, const unsigned unit)
|
|||
return index;
|
||||
}
|
||||
|
||||
|
||||
static inline GLboolean
|
||||
is_wrap_gl_clamp(GLint param)
|
||||
{
|
||||
return param == GL_CLAMP || param == GL_MIRROR_CLAMP_EXT;
|
||||
}
|
||||
|
||||
static void
|
||||
update_gl_clamp(struct st_context *st, struct gl_program *prog, uint32_t *gl_clamp)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue