From 7a990ef3d4e5493896d6083be01f83500f01f718 Mon Sep 17 00:00:00 2001 From: rbpursue Date: Mon, 12 May 2025 11:37:18 -0700 Subject: [PATCH 1/5] Update nf-dxgi-idxgidevice-setgputhreadpriority.md Adding priority bits decode information and interpretation of the priority. --- ...f-dxgi-idxgidevice-setgputhreadpriority.md | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md index c7f046cbdded..994b8e5e1429 100644 --- a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md +++ b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md @@ -78,6 +78,26 @@ The values for the Priority parameter function as follows: To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. You should profile your application to ensure that it behaves as intended. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience. +Priority Values Bit Definition: + + +Use D3DKMT_SETCONTEXTSCHEDULINGPRIORITY_ABSOLUTE only if you have thorough understanding of dxgkrnl/graphics priorities and understand repercussions of changing them. + +Priority Values Bits[4:0] tranlsates to following priority values: + + ## -see-also DXGI Interfaces @@ -88,4 +108,4 @@ To use the SetGPUThreadPriority method, you should have a comprehensive u -IDXGIDevice::GetGPUThreadPriority \ No newline at end of file +IDXGIDevice::GetGPUThreadPriority From e93c47d6c996e6e23cc5af2f78745de49d9a53be Mon Sep 17 00:00:00 2001 From: rbpursue Date: Tue, 13 May 2025 10:16:34 -0700 Subject: [PATCH 2/5] Update nf-dxgi-idxgidevice-setgputhreadpriority.md Update description --- .../nf-dxgi-idxgidevice-setgputhreadpriority.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md index 994b8e5e1429..17bfc0bc2a36 100644 --- a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md +++ b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md @@ -59,7 +59,7 @@ Sets the GPU thread priority. Type: INT -A value that specifies the required GPU thread priority. This value must be between -7 and 7, inclusive, where 0 represents normal priority. +A value that specifies the required GPU thread priority. (See Remarks) ## -returns @@ -76,25 +76,29 @@ The values for the Priority parameter function as follows:
  • Negative values lessen the likelihood that the device will receive GPU execution cycles when devices compete for them.
  • The device is guaranteed to receive some GPU execution cycles at all settings.
  • -To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. You should profile your application to ensure that it behaves as intended. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience. +To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience, so profile your application to understand impact of priority change on application and on system. Priority Values Bit Definition: -Use D3DKMT_SETCONTEXTSCHEDULINGPRIORITY_ABSOLUTE only if you have thorough understanding of dxgkrnl/graphics priorities and understand repercussions of changing them. +Bit 30 (Absolute Priority Flag) can be used to control the mode of operation for this API. + +Relative Priority Mode : API will use this mode when bit 30 value is set to 0. In this mode, Priority value must be between -7 and 7, inclusive, where priority value 0 represents normal priority (Default for all contexts) and -7 represents Idle priority. Bit 31 is used to control sign of the priority. + +Relative Priority Mode : API will use this mode when bit 30 value is set to 1. In this mode, Priority value (for bits[4:0]) must be between 0 and 31. Meaning of these priority levels is described below. Use D3DKMT_SETCONTEXTSCHEDULINGPRIORITY_ABSOLUTE only if you have thorough understanding of dxgkrnl/graphics priorities and understand repercussions of changing them. Priority Values Bits[4:0] tranlsates to following priority values: From 5895a5240720177539eea35533b4664f384c5bed Mon Sep 17 00:00:00 2001 From: rbpursue Date: Tue, 13 May 2025 10:24:11 -0700 Subject: [PATCH 3/5] Update nf-dxgi-idxgidevice-setgputhreadpriority.md One more update to document. --- .../nf-dxgi-idxgidevice-setgputhreadpriority.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md index 17bfc0bc2a36..be5492c28448 100644 --- a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md +++ b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md @@ -69,15 +69,9 @@ Return S_OK if successful; otherwise, returns E_INVALIDARG if the PriorityPriority parameter function as follows: - -
      -
    • Positive values increase the likelihood that the GPU scheduler will grant GPU execution cycles to the device when rendering.
    • -
    • Negative values lessen the likelihood that the device will receive GPU execution cycles when devices compete for them.
    • -
    • The device is guaranteed to receive some GPU execution cycles at all settings.
    • -
    To use the SetGPUThreadPriority method, you should have a comprehensive understanding of GPU scheduling. If used inappropriately, the SetGPUThreadPriority method can impede rendering speed and result in a poor user experience, so profile your application to understand impact of priority change on application and on system. +The values for the Priority parameter function as follows: Priority Values Bit Definition:
      Bit 0-4 : Priority Value
      @@ -89,6 +83,11 @@ Bit 31 : Signed bit
      Bit 30 (Absolute Priority Flag) can be used to control the mode of operation for this API. Relative Priority Mode : API will use this mode when bit 30 value is set to 0. In this mode, Priority value must be between -7 and 7, inclusive, where priority value 0 represents normal priority (Default for all contexts) and -7 represents Idle priority. Bit 31 is used to control sign of the priority. +
        +
      • Positive values increase the likelihood that the GPU scheduler will grant GPU execution cycles to the device when rendering.
      • +
      • Negative values lessen the likelihood that the device will receive GPU execution cycles when devices compete for them.
      • +
      • The device is guaranteed to receive some GPU execution cycles at all settings.
      • +
      Relative Priority Mode : API will use this mode when bit 30 value is set to 1. In this mode, Priority value (for bits[4:0]) must be between 0 and 31. Meaning of these priority levels is described below. Use D3DKMT_SETCONTEXTSCHEDULINGPRIORITY_ABSOLUTE only if you have thorough understanding of dxgkrnl/graphics priorities and understand repercussions of changing them. From 1a4e3ad4654eda65cddaa3e6b3b7ecd975b58742 Mon Sep 17 00:00:00 2001 From: rbpursue Date: Wed, 14 May 2025 11:15:15 -0700 Subject: [PATCH 4/5] Update nf-dxgi-idxgidevice-setgputhreadpriority.md Based on internal review, removing some description. --- .../dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md index be5492c28448..b2916484f7b7 100644 --- a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md +++ b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md @@ -83,15 +83,10 @@ Bit 31 : Signed bit
      Bit 30 (Absolute Priority Flag) can be used to control the mode of operation for this API. Relative Priority Mode : API will use this mode when bit 30 value is set to 0. In this mode, Priority value must be between -7 and 7, inclusive, where priority value 0 represents normal priority (Default for all contexts) and -7 represents Idle priority. Bit 31 is used to control sign of the priority. -
        -
      • Positive values increase the likelihood that the GPU scheduler will grant GPU execution cycles to the device when rendering.
      • -
      • Negative values lessen the likelihood that the device will receive GPU execution cycles when devices compete for them.
      • -
      • The device is guaranteed to receive some GPU execution cycles at all settings.
      • -
      -Relative Priority Mode : API will use this mode when bit 30 value is set to 1. In this mode, Priority value (for bits[4:0]) must be between 0 and 31. Meaning of these priority levels is described below. Use D3DKMT_SETCONTEXTSCHEDULINGPRIORITY_ABSOLUTE only if you have thorough understanding of dxgkrnl/graphics priorities and understand repercussions of changing them. +Absolute Priority Mode : API will use this mode when bit 30 value is set to 1. In this mode, Priority value (for bits[4:0]) must be between 0 and 31. Meaning of these priority levels is described below. Use D3DKMT_SETCONTEXTSCHEDULINGPRIORITY_ABSOLUTE only if you have thorough understanding of dxgkrnl/graphics priorities and understand repercussions of changing them. -Priority Values Bits[4:0] tranlsates to following priority values: +Priority Values Bits[4:0] translates to following priority values:
        0 : Idle Priority - Forward progress is not guaranteed if higher priorties use most of the accelerator time.
        1 : Normal Priority - Most of the processes use this priority with forward progress guarantee.
        From f8c6c7b840d34349b1f3cd11abd211620b97c601 Mon Sep 17 00:00:00 2001 From: Steven White <31261191+stevewhims@users.noreply.github.com> Date: Wed, 14 May 2025 12:45:58 -0700 Subject: [PATCH 5/5] Update nf-dxgi-idxgidevice-setgputhreadpriority.md --- .../content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md index b2916484f7b7..8b06b450215f 100644 --- a/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md +++ b/sdk-api-src/content/dxgi/nf-dxgi-idxgidevice-setgputhreadpriority.md @@ -59,7 +59,7 @@ Sets the GPU thread priority. Type: INT -A value that specifies the required GPU thread priority. (See Remarks) +A value that specifies the required GPU thread priority. See the [Remarks](#remarks) section in this topic. ## -returns