Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions media_driver/agnostic/Xe_M/Xe_XPM/hw/mhw_state_heap_xe_xpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,18 @@ MOS_STATUS MHW_STATE_HEAP_INTERFACE_XE_XPM::AddSamplerStateData(
mhw_state_heap_xe_xpm::SAMPLER_STATE_CMD unormSampler;
mhw_state_heap_xe_xpm::SAMPLER_INDIRECT_STATE_CMD indirectState;

// indirectState is scratch space consumed entirely within this block:
// SetSamplerState writes to it via pParam->Unorm.pIndirectState and the
// result is copied out below. The pointer never outlives indirectState,
// so suppress GCC's false-positive dangling-pointer warning (GCC 16+).
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
pParam->Unorm.pIndirectState = &indirectState;
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic pop
#endif

MHW_MI_CHK_STATUS(SetSamplerState(&unormSampler, pParam));

Expand Down
11 changes: 11 additions & 0 deletions media_driver/agnostic/gen11/hw/mhw_state_heap_g11.c
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,18 @@ MOS_STATUS MHW_STATE_HEAP_INTERFACE_G11_X::AddSamplerStateData(
mhw_state_heap_g11_X::SAMPLER_STATE_CMD unormSampler;
mhw_state_heap_g11_X::SAMPLER_INDIRECT_STATE_CMD indirectState;

// indirectState is scratch space consumed entirely within this block:
// SetSamplerState writes to it via pParam->Unorm.pIndirectState and the
// result is copied out below. The pointer never outlives indirectState,
// so suppress GCC's false-positive dangling-pointer warning (GCC 16+).
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
pParam->Unorm.pIndirectState = &indirectState;
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic pop
#endif

MHW_MI_CHK_STATUS(SetSamplerState(&unormSampler, pParam));

Expand Down
11 changes: 11 additions & 0 deletions media_driver/agnostic/gen12/hw/mhw_state_heap_g12.c
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,18 @@ MOS_STATUS MHW_STATE_HEAP_INTERFACE_G12_X::AddSamplerStateData(
mhw_state_heap_g12_X::SAMPLER_STATE_CMD unormSampler;
mhw_state_heap_g12_X::SAMPLER_INDIRECT_STATE_CMD indirectState;

// indirectState is scratch space consumed entirely within this block:
// SetSamplerState writes to it via pParam->Unorm.pIndirectState and the
// result is copied out below. The pointer never outlives indirectState,
// so suppress GCC's false-positive dangling-pointer warning (GCC 16+).
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
pParam->Unorm.pIndirectState = &indirectState;
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic pop
#endif

MHW_MI_CHK_STATUS(SetSamplerState(&unormSampler, pParam));

Expand Down
11 changes: 11 additions & 0 deletions media_driver/agnostic/gen8/hw/mhw_state_heap_g8.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,18 @@ MOS_STATUS MHW_STATE_HEAP_INTERFACE_G8_X::AddSamplerStateData(
mhw_state_heap_g8_X::SAMPLER_STATE_CMD unormSampler;
mhw_state_heap_g8_X::SAMPLER_INDIRECT_STATE_CMD indirectState;

// indirectState is scratch space consumed entirely within this block:
// SetSamplerState writes to it via pParam->Unorm.pIndirectState and the
// result is copied out below. The pointer never outlives indirectState,
// so suppress GCC's false-positive dangling-pointer warning (GCC 16+).
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
pParam->Unorm.pIndirectState = &indirectState;
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic pop
#endif

MHW_MI_CHK_STATUS(SetSamplerState(&unormSampler, pParam));

Expand Down
11 changes: 11 additions & 0 deletions media_driver/agnostic/gen9/hw/mhw_state_heap_g9.c
Original file line number Diff line number Diff line change
Expand Up @@ -1035,7 +1035,18 @@ MOS_STATUS MHW_STATE_HEAP_INTERFACE_G9_X::AddSamplerStateData(
mhw_state_heap_g9_X::SAMPLER_STATE_CMD unormSampler;
mhw_state_heap_g9_X::SAMPLER_INDIRECT_STATE_CMD indirectState;

// indirectState is scratch space consumed entirely within this block:
// SetSamplerState writes to it via pParam->Unorm.pIndirectState and the
// result is copied out below. The pointer never outlives indirectState,
// so suppress GCC's false-positive dangling-pointer warning (GCC 16+).
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdangling-pointer"
#endif
pParam->Unorm.pIndirectState = &indirectState;
#if defined(__GNUC__) && !defined(__clang__) && (__GNUC__ >= 12)
#pragma GCC diagnostic pop
#endif

MHW_MI_CHK_STATUS(SetSamplerState(&unormSampler, pParam));

Expand Down
Loading