faster/more compact MatchValueAndRef
Made commandprocessor GetcurrentRingReadcount inline, it was made noinline to match PGO decisions but i think PGO can make extra reg allocation decisions that make this inlining choice yield gains, whereas if we do it manually we lose a tiny bit of performance Working on a more compact vectorized version of GetScissor to save icache on cmd processor thread Add WriteRegisterForceinline, will probably end up amending to remove it add ERMS path for vastcpy Adding WriteRegistersFromMemCommonSense (name will be changed later), name is because i realized my approach with optimizing writeregisters has been backwards, instead of handling all checks more quickly within the loop that writes the registers, we need a different loop for each range with unique handling. we also manage to hoist a lot of the logic out of the loops Use 100ns delay for MaybeYield, noticed we often return almost immediately from the syscall so we end up wasting some cpu, instead we give up the cpu for the min waitable time (on my system, this is 0.5 ms) Added a note about affinity mask/dynamic process affinity updates to threading_win Add TextureFetchConstantsWritten
This commit is contained in:
@@ -60,6 +60,12 @@ namespace xe {
|
||||
namespace threading {
|
||||
|
||||
void EnableAffinityConfiguration() {
|
||||
// chrispy: i don't think this is necessary,
|
||||
// affinity always seems to be the system mask? research more
|
||||
// also, maybe if ignore_thread_affinities is on we should use
|
||||
// SetProcessAffinityUpdateMode to allow windows to dynamically update
|
||||
// our process' affinity (by default windows cannot change the affinity itself
|
||||
// at runtime, user code must do it)
|
||||
HANDLE process_handle = GetCurrentProcess();
|
||||
DWORD_PTR process_affinity_mask;
|
||||
DWORD_PTR system_affinity_mask;
|
||||
@@ -117,7 +123,7 @@ void set_name(const std::string_view name) {
|
||||
|
||||
// checked ntoskrnl, it does not modify delay, so we can place this as a
|
||||
// constant and avoid creating a stack variable
|
||||
static const LARGE_INTEGER sleepdelay0_for_maybeyield{{0LL}};
|
||||
static const LARGE_INTEGER sleepdelay0_for_maybeyield{{~0u, -1}};
|
||||
|
||||
void MaybeYield() {
|
||||
#if 0
|
||||
|
||||
Reference in New Issue
Block a user