diff options
author | Samuel Pitoiset <[email protected]> | 2017-05-19 12:47:16 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-06-14 10:04:36 +0200 |
commit | b1288fad3c143698685baeedc40ee979f352e12b (patch) | |
tree | e92b00c828dda5931b32fdc4291f0ed68d6a3591 /src/mesa/state_tracker/st_atom_sampler.c | |
parent | 76b8758253fc640616bb00d47a0362353cba4ada (diff) |
st/mesa: disable per-context seamless cubemap when using texture handles
The ARB_bindless_texture spec say:
"If ARB_seamless_cubemap (or OpenGL 4.0, which includes it) is
supported, the per-context seamless cubemap enable is ignored
and treated as disabled when using texture handles."
"If AMD_seamless_cubemap_per_texture is supported, the seamless
cube map texture parameter of the underlying texture does apply
when texture handles are used."
The per-context seamless cubemap flag should only be enabled for
bound textures/samplers.
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_atom_sampler.c')
-rw-r--r-- | src/mesa/state_tracker/st_atom_sampler.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index c6d992fbb0e..8c121d54071 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -135,7 +135,6 @@ st_convert_sampler(const struct st_context *st, const struct gl_sampler_object *msamp, struct pipe_sampler_state *sampler) { - struct gl_context *ctx = st->ctx; GLenum texBaseFormat; texBaseFormat = _mesa_texture_base_format(texobj); @@ -226,8 +225,11 @@ st_convert_sampler(const struct st_context *st, sampler->compare_func = st_compare_func_to_pipe(msamp->CompareFunc); } - sampler->seamless_cube_map = - ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; + /* Only set the seamless cube map texture parameter because the per-context + * enable should be ignored and treated as disabled when using texture + * handles, as specified by ARB_bindless_texture. + */ + sampler->seamless_cube_map = msamp->CubeMapSeamless; } /** @@ -250,6 +252,7 @@ st_convert_sampler_from_unit(const struct st_context *st, st_convert_sampler(st, texobj, msamp, sampler); sampler->lod_bias += ctx->Texture.Unit[texUnit].LodBias; + sampler->seamless_cube_map |= ctx->Texture.CubeMapSeamless; } |