mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
mesa: use texture format functions
This commit is contained in:
parent
4fc344790d
commit
ef089604a9
2 changed files with 4 additions and 4 deletions
|
|
@ -209,7 +209,7 @@ update_samplers(struct st_context *st)
|
||||||
}
|
}
|
||||||
|
|
||||||
xlate_border_color(texobj->BorderColor,
|
xlate_border_color(texobj->BorderColor,
|
||||||
teximg ? teximg->TexFormat->BaseFormat : GL_RGBA,
|
teximg ? teximg->_BaseFormat : GL_RGBA,
|
||||||
sampler->border_color);
|
sampler->border_color);
|
||||||
|
|
||||||
sampler->max_anisotropy = texobj->MaxAnisotropy;
|
sampler->max_anisotropy = texobj->MaxAnisotropy;
|
||||||
|
|
|
||||||
|
|
@ -563,7 +563,7 @@ st_TexImage(GLcontext * ctx,
|
||||||
|
|
||||||
_mesa_set_fetch_functions(texImage, dims);
|
_mesa_set_fetch_functions(texImage, dims);
|
||||||
|
|
||||||
if (texImage->TexFormat->TexelBytes == 0) {
|
if (_mesa_is_format_compressed(texImage->TexFormat->MesaFormat)) {
|
||||||
/* must be a compressed format */
|
/* must be a compressed format */
|
||||||
texelBytes = 0;
|
texelBytes = 0;
|
||||||
texImage->IsCompressed = GL_TRUE;
|
texImage->IsCompressed = GL_TRUE;
|
||||||
|
|
@ -573,7 +573,7 @@ st_TexImage(GLcontext * ctx,
|
||||||
texImage->TexFormat->MesaFormat);
|
texImage->TexFormat->MesaFormat);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
texelBytes = texImage->TexFormat->TexelBytes;
|
texelBytes = _mesa_get_format_bytes(texImage->TexFormat->MesaFormat);
|
||||||
|
|
||||||
/* Minimum pitch of 32 bytes */
|
/* Minimum pitch of 32 bytes */
|
||||||
if (postConvWidth * texelBytes < 32) {
|
if (postConvWidth * texelBytes < 32) {
|
||||||
|
|
@ -1838,7 +1838,7 @@ st_finalize_texture(GLcontext *ctx,
|
||||||
cpp = compressed_num_bytes(firstImage->base.TexFormat->MesaFormat);
|
cpp = compressed_num_bytes(firstImage->base.TexFormat->MesaFormat);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
cpp = firstImage->base.TexFormat->TexelBytes;
|
cpp = _mesa_get_format_bytes(firstImage->base.TexFormat->MesaFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we already have a gallium texture, check that it matches the texture
|
/* If we already have a gallium texture, check that it matches the texture
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue