mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 20:48:08 +02:00
gallium: add missing zero-init for resource templates
Mostly test code, plus one spot I noticed in r600. Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
3ebfc44b42
commit
495ba8884a
10 changed files with 17 additions and 0 deletions
|
|
@ -1361,6 +1361,7 @@ bool r600_init_flushed_depth_texture(struct pipe_context *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
memset(&resource, 0, sizeof(resource));
|
||||
resource.target = texture->target;
|
||||
resource.format = pipe_format;
|
||||
resource.width0 = texture->width0;
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ static void init_tex( void )
|
|||
tex2d[1][1][3] = 255;
|
||||
#endif
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
templat.width0 = SIZE;
|
||||
|
|
@ -402,6 +403,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ graw_util_create_window(struct graw_info *info,
|
|||
int i;
|
||||
|
||||
memset(info, 0, sizeof(*info));
|
||||
memset(&resource_temp, 0, sizeof(resource_temp));
|
||||
|
||||
/* It's hard to say whether window or screen should be created
|
||||
* first. Different environments would prefer one or the other.
|
||||
|
|
@ -224,6 +225,7 @@ graw_util_create_tex2d(const struct graw_info *info,
|
|||
struct pipe_resource temp, *tex;
|
||||
struct pipe_box box;
|
||||
|
||||
memset(&temp, 0, sizeof(temp));
|
||||
temp.target = PIPE_TEXTURE_2D;
|
||||
temp.format = format;
|
||||
temp.width0 = width;
|
||||
|
|
|
|||
|
|
@ -150,6 +150,7 @@ static void init_fs_constbuf( void )
|
|||
{
|
||||
struct pipe_resource templat;
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_BUFFER;
|
||||
templat.format = PIPE_FORMAT_R8_UNORM;
|
||||
templat.width0 = sizeof(constants1);
|
||||
|
|
@ -383,6 +384,7 @@ static void init_tex( void )
|
|||
tex2d[1][1][3] = 255;
|
||||
#endif
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
templat.width0 = SIZE;
|
||||
|
|
@ -492,6 +494,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -209,6 +209,7 @@ static void init_tex( void )
|
|||
tex2d[1][1][3] = 255;
|
||||
#endif
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
templat.width0 = SIZE;
|
||||
|
|
@ -317,6 +318,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -250,6 +250,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ static void init_fs_constbuf( void )
|
|||
struct pipe_resource templat;
|
||||
struct pipe_box box;
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_BUFFER;
|
||||
templat.format = PIPE_FORMAT_R8_UNORM;
|
||||
templat.width0 = sizeof(constants);
|
||||
|
|
@ -281,6 +282,7 @@ static void init_tex( void )
|
|||
tex2d[1][1][3] = 255;
|
||||
#endif
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = PIPE_FORMAT_B8G8R8A8_UNORM;
|
||||
templat.width0 = SIZE;
|
||||
|
|
@ -390,6 +392,7 @@ static void init( void )
|
|||
if (ctx == NULL)
|
||||
exit(3);
|
||||
|
||||
memset(&templat, 0, sizeof(templat));
|
||||
templat.target = PIPE_TEXTURE_2D;
|
||||
templat.format = formats[i];
|
||||
templat.width0 = WIDTH;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue