mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 23:30:22 +01:00
formatquery: use correct target check for IMAGE_FORMAT_COMPATIBILITY_TYPE
From the spec:
"IMAGE_FORMAT_COMPATIBILITY_TYPE: The matching criteria use for the
resource when used as an image textures is returned in
<params>. This is equivalent to calling GetTexParameter"
So we would need to return None for any target not supported by
GetTexParameter. By mistake, we were using the target check for
GetTexLevelParameter.
v2: fix typo (GetTextParameter vs GetTexParemeter) on comment (Illia Mirkin)
Reviewed-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
05a94a4dfc
commit
fd011376cb
1 changed files with 7 additions and 1 deletions
|
|
@ -1430,7 +1430,13 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
|
|||
if (!_mesa_has_ARB_shader_image_load_store(ctx))
|
||||
goto end;
|
||||
|
||||
if (!_mesa_legal_get_tex_level_parameter_target(ctx, target, true))
|
||||
/* As pointed by the spec quote below, this pname query should return
|
||||
* the same value that GetTexParameter. So if the target is not valid
|
||||
* for GetTexParameter we return the unsupported value. The check below
|
||||
* is the same target check used by GetTexParameter.
|
||||
*/
|
||||
int targetIndex = _mesa_tex_target_to_index(ctx, target);
|
||||
if (targetIndex < 0 || targetIndex == TEXTURE_BUFFER_INDEX)
|
||||
goto end;
|
||||
|
||||
/* From spec: "Equivalent to calling GetTexParameter with <value> set
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue