Skip to content

Commit

Permalink
fix: change SamplerState IndirectStatePointer functions
Browse files Browse the repository at this point in the history
- set and get ExtendedIndirectStatePointer

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <[email protected]>
  • Loading branch information
HoppeMateusz authored and Compute-Runtime-Automation committed Apr 16, 2024
1 parent a230c76 commit 4b4d21a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
14 changes: 7 additions & 7 deletions shared/source/generated/gen12lp/hw_cmds_generated_gen12lp.inl
Original file line number Diff line number Diff line change
Expand Up @@ -3132,15 +3132,15 @@ typedef struct tagSAMPLER_STATE {
INDIRECTSTATEPOINTER_ALIGN_SIZE = 0x40,
} INDIRECTSTATEPOINTER;
inline void setIndirectStatePointer(const uint32_t value) {
UNRECOVERABLE_IF(value > 0xffffff);
TheStructure.Common.IndirectStatePointer = static_cast<uint32_t>(value) >> INDIRECTSTATEPOINTER_BIT_SHIFT;
}
inline uint32_t getIndirectStatePointer() const {
return TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT;
UNRECOVERABLE_IF(value & 0x3f);
TheStructure.Common.IndirectStatePointer = static_cast<uint32_t>(value & 0xffffc0) >> INDIRECTSTATEPOINTER_BIT_SHIFT;
setExtendedIndirectStatePointer(value);
}
inline void setExtendedIndirectStatePointer(const uint32_t value) {
UNRECOVERABLE_IF(value > 0xff);
TheStructure.Common.ExtendedIndirectStatePointer = value;
TheStructure.Common.ExtendedIndirectStatePointer = static_cast<uint32_t>(value & 0xff000000) >> 24;
}
inline uint64_t getIndirectStatePointer() const {
return (TheStructure.Common.ExtendedIndirectStatePointer << 24) | (TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT);
}
inline uint32_t getExtendedIndirectStatePointer() const {
return TheStructure.Common.ExtendedIndirectStatePointer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2782,12 +2782,16 @@ typedef struct tagSAMPLER_STATE {
INDIRECTSTATEPOINTER_BIT_SHIFT = 0x6,
INDIRECTSTATEPOINTER_ALIGN_SIZE = 0x40,
} INDIRECTSTATEPOINTER;
inline void setIndirectStatePointer(const uint64_t value) {
UNRECOVERABLE_IF(value > 0xffffc0L);
TheStructure.Common.IndirectStatePointer = static_cast<uint32_t>(value) >> INDIRECTSTATEPOINTER_BIT_SHIFT;
inline void setIndirectStatePointer(const uint32_t value) {
UNRECOVERABLE_IF(value & 0x3f);
TheStructure.Common.IndirectStatePointer = static_cast<uint32_t>(value & 0xffffc0) >> INDIRECTSTATEPOINTER_BIT_SHIFT;
setExtendedIndirectStatePointer(value);
}
inline void setExtendedIndirectStatePointer(const uint32_t value) {
TheStructure.Common.ExtendedIndirectStatePointer = static_cast<uint32_t>(value & 0xff000000) >> 24;
}
inline uint64_t getIndirectStatePointer() const {
return TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT;
return (TheStructure.Common.ExtendedIndirectStatePointer << 24) | (TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT);
}
inline void setTczAddressControlMode(const TEXTURE_COORDINATE_MODE value) {
TheStructure.Common.TczAddressControlMode = value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2239,7 +2239,7 @@ typedef struct tagSAMPLER_STATE {
uint32_t ReturnFilterWeightForBorderTexels : BITFIELD_RANGE(3, 3);
uint32_t Reserved_68 : BITFIELD_RANGE(4, 5);
uint32_t IndirectStatePointer : BITFIELD_RANGE(6, 23);
uint32_t Reserved_88 : BITFIELD_RANGE(24, 31);
uint32_t ExtendedIndirectStatePointer : BITFIELD_RANGE(24, 31);
uint32_t TczAddressControlMode : BITFIELD_RANGE(0, 2);
uint32_t TcyAddressControlMode : BITFIELD_RANGE(3, 5);
uint32_t TcxAddressControlMode : BITFIELD_RANGE(6, 8);
Expand Down Expand Up @@ -2531,11 +2531,15 @@ typedef struct tagSAMPLER_STATE {
INDIRECTSTATEPOINTER_ALIGN_SIZE = 0x40,
} INDIRECTSTATEPOINTER;
inline void setIndirectStatePointer(const uint32_t value) {
DEBUG_BREAK_IF(value > 0xffffc0);
TheStructure.Common.IndirectStatePointer = static_cast<uint32_t>(value) >> INDIRECTSTATEPOINTER_BIT_SHIFT;
UNRECOVERABLE_IF(value & 0x3f);
TheStructure.Common.IndirectStatePointer = static_cast<uint32_t>(value & 0xffffc0) >> INDIRECTSTATEPOINTER_BIT_SHIFT;
setExtendedIndirectStatePointer(value);
}
inline uint32_t getIndirectStatePointer() const {
return TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT;
inline void setExtendedIndirectStatePointer(const uint32_t value) {
TheStructure.Common.ExtendedIndirectStatePointer = static_cast<uint32_t>(value & 0xff000000) >> 24;
}
inline uint64_t getIndirectStatePointer() const {
return (TheStructure.Common.ExtendedIndirectStatePointer << 24) | (TheStructure.Common.IndirectStatePointer << INDIRECTSTATEPOINTER_BIT_SHIFT);
}
inline void setTczAddressControlMode(const TEXTURE_COORDINATE_MODE value) {
TheStructure.Common.TczAddressControlMode = value;
Expand Down

0 comments on commit 4b4d21a

Please sign in to comment.