intel/blorp: initialize BLEND_STATE using braced initializer list
Coverity complains that memset has no effect, because of size 0. Size of BLEND_STATE struct is 0 on gfx [6, 7.5], so memset has nothing to do there. This is of course harmless, but we can make code simpler by replacing memset with an empty initializer list and at the same time avoid a warning from Coverity. CID: 1486015 Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11574>
This commit is contained in:
parent
5c5423e6ee
commit
5c66fb7e6e
|
@ -1079,8 +1079,7 @@ static uint32_t
|
|||
blorp_emit_blend_state(struct blorp_batch *batch,
|
||||
const struct blorp_params *params)
|
||||
{
|
||||
struct GENX(BLEND_STATE) blend;
|
||||
memset(&blend, 0, sizeof(blend));
|
||||
struct GENX(BLEND_STATE) blend = { };
|
||||
|
||||
uint32_t offset;
|
||||
int size = GENX(BLEND_STATE_length) * 4;
|
||||
|
|
Loading…
Reference in New Issue