mesa/st, nine, nouveau: Fix uninitialized pipe_sampler_view structs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20378>
This commit is contained in:
@@ -1157,7 +1157,7 @@ nv50_blit_set_src(struct nv50_blitctx *blit,
|
||||
{
|
||||
struct nv50_context *nv50 = blit->nv50;
|
||||
struct pipe_context *pipe = &nv50->base.pipe;
|
||||
struct pipe_sampler_view templ;
|
||||
struct pipe_sampler_view templ = {0};
|
||||
uint32_t flags;
|
||||
enum pipe_texture_target target;
|
||||
|
||||
|
||||
@@ -760,7 +760,7 @@ nvc0_validate_fbread(struct nvc0_context *nvc0)
|
||||
nvc0->fragprog->fp.reads_framebuffer &&
|
||||
nvc0->framebuffer.nr_cbufs &&
|
||||
nvc0->framebuffer.cbufs[0]) {
|
||||
struct pipe_sampler_view tmpl;
|
||||
struct pipe_sampler_view tmpl = {0};
|
||||
struct pipe_surface *sf = nvc0->framebuffer.cbufs[0];
|
||||
|
||||
tmpl.target = PIPE_TEXTURE_2D_ARRAY;
|
||||
|
||||
@@ -969,7 +969,7 @@ nvc0_blit_set_src(struct nvc0_blitctx *ctx,
|
||||
{
|
||||
struct nvc0_context *nvc0 = ctx->nvc0;
|
||||
struct pipe_context *pipe = &nvc0->base.pipe;
|
||||
struct pipe_sampler_view templ;
|
||||
struct pipe_sampler_view templ = {0};
|
||||
uint32_t flags;
|
||||
unsigned s;
|
||||
enum pipe_texture_target target;
|
||||
|
||||
@@ -493,6 +493,7 @@ NineBaseTexture9_UpdateSamplerView( struct NineBaseTexture9 *This,
|
||||
enum pipe_format srgb_format;
|
||||
unsigned i;
|
||||
uint8_t swizzle[4];
|
||||
memset(&templ, 0, sizeof(templ));
|
||||
|
||||
DBG("This=%p sRGB=%d\n", This, sRGB);
|
||||
|
||||
|
||||
@@ -440,6 +440,7 @@ st_create_texture_sampler_view_from_stobj(struct st_context *st,
|
||||
unsigned swizzle = glsl130_or_later ? texObj->SwizzleGLSL130 : texObj->Swizzle;
|
||||
|
||||
templ.format = format;
|
||||
templ.is_tex2d_from_buf = false;
|
||||
|
||||
if (texObj->level_override >= 0) {
|
||||
templ.u.tex.first_level = templ.u.tex.last_level = texObj->level_override;
|
||||
@@ -579,6 +580,7 @@ st_get_buffer_sampler_view_from_stobj(struct st_context *st,
|
||||
*/
|
||||
struct pipe_sampler_view templ;
|
||||
|
||||
templ.is_tex2d_from_buf = false;
|
||||
templ.format =
|
||||
st_mesa_format_to_pipe_format(st, texObj->_BufferObjectFormat);
|
||||
templ.target = PIPE_BUFFER;
|
||||
|
||||
Reference in New Issue
Block a user