mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
gallium/tgsi: Redefine the TGSI_TEXTURE_UNKNOWN texture target.
Some code relies on the existing of an invalid texture target. It seems
safer to bring it back than to deal with unintended consequences.
This partially reverts commit a4ebb04214.
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
11aa82cc0b
commit
223831ca14
5 changed files with 8 additions and 4 deletions
|
|
@ -707,7 +707,7 @@ tgsi_default_instruction_texture( void )
|
|||
{
|
||||
struct tgsi_instruction_texture instruction_texture;
|
||||
|
||||
instruction_texture.Texture = TGSI_BUFFER;
|
||||
instruction_texture.Texture = TGSI_TEXTURE_UNKNOWN;
|
||||
instruction_texture.NumOffsets = 0;
|
||||
instruction_texture.Padding = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,8 @@ const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
|
|||
"2DARRAY",
|
||||
"SHADOW1DARRAY",
|
||||
"SHADOW2DARRAY",
|
||||
"SHADOWCUBE"
|
||||
"SHADOWCUBE",
|
||||
"UNKNOWN"
|
||||
};
|
||||
|
||||
const char *tgsi_property_names[TGSI_PROPERTY_COUNT] =
|
||||
|
|
|
|||
|
|
@ -674,7 +674,7 @@ pipe_tex_to_tgsi_tex(enum pipe_texture_target pipe_tex_target)
|
|||
return TGSI_TEXTURE_2D_ARRAY;
|
||||
default:
|
||||
assert(0 && "unexpected texture target");
|
||||
return 0;
|
||||
return TGSI_TEXTURE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -349,6 +349,8 @@ static nv50_ir::TexTarget translateTexture(uint tex)
|
|||
NV50_IR_TEX_TARG_CASE(SHADOWRECT, RECT_SHADOW);
|
||||
case TGSI_BUFFER:
|
||||
return nv50_ir::TEX_TARGET_BUFFER;
|
||||
|
||||
case TGSI_TEXTURE_UNKNOWN:
|
||||
default:
|
||||
assert(!"invalid texture target");
|
||||
return nv50_ir::TEX_TARGET_2D;
|
||||
|
|
|
|||
|
|
@ -504,7 +504,8 @@ struct tgsi_instruction_label
|
|||
#define TGSI_TEXTURE_SHADOW1D_ARRAY 11
|
||||
#define TGSI_TEXTURE_SHADOW2D_ARRAY 12
|
||||
#define TGSI_TEXTURE_SHADOWCUBE 13
|
||||
#define TGSI_TEXTURE_COUNT 14
|
||||
#define TGSI_TEXTURE_UNKNOWN 14
|
||||
#define TGSI_TEXTURE_COUNT 15
|
||||
|
||||
struct tgsi_instruction_texture
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue