Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tunning eyebuffersize & performance level on PFDM MR device #1806

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EasonZxp
Copy link
Contributor

@EasonZxp EasonZxp commented Mar 12, 2025

Since the PFDM MR device uses two 4K screens, and the recommended eye buffer size is 2880x2664, using this recommended eyeBuffer size would cause severe performance issues, so a ratio is added to reduce the rendering resolution

Closes #1805

@EasonZxp EasonZxp marked this pull request as draft March 12, 2025 09:29
@EasonZxp EasonZxp changed the title Add a ratio to tuning eyebuffer size on PFDM MR device Add a ratio to tuning eyebuffer size & perf setting level on PFDM MR device Mar 12, 2025
@EasonZxp
Copy link
Contributor Author

@svillar

I added a ratio to adjust the eyebuffer, and also set the perf setting level to high on PFDM MR devices.

This allows us to achieve 90 FPS in scenes with high rendering pressure, such as when multiple tabs are open.

Pls help to review.

@EasonZxp EasonZxp marked this pull request as ready for review March 12, 2025 09:45
Copy link
Member

@svillar svillar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the rationale of the change but the problem seems to be more on the side of the runtime that recommends a resolution that is perhaps excessive for the computing power of the machine. What I mean is that recommendedImageRect* should have sensible values and should not require any adjustment.

That's why I think you should better add the code under #ifdef PDFM because the current code is fundamentally correct, and those specifics should be handled as what they are, i.e., exceptions to the norm.

@EasonZxp
Copy link
Contributor Author

I understand the rationale of the change but the problem seems to be more on the side of the runtime that recommends a resolution that is perhaps excessive for the computing power of the machine. What I mean is that recommendedImageRect* should have sensible values and should not require any adjustment.

That's why I think you should better add the code under #ifdef PDFM because the current code is fundamentally correct, and those specifics should be handled as what they are, i.e., exceptions to the norm.

Thank you for the clarification. From the device manufacturer's perspective, they are leveraging 4K screens where a higher EyeBuffer resolution is recommended to fully utilize the display capabilities. While the suggested EyeBuffer size may work smoothly for certain applications, performance issues could arise in heavy-load scenarios. This makes it challenging to define a one-size-fits-all recommendation value across all use cases.

Regarding the code adjustment, yes – my modification already includes a check for PDFM.

Are you proposing to enforce stricter control through macro definitions (i.e., #ifdef PDFM)? If so, I can submit a modification again.

Thanks

@svillar
Copy link
Member

svillar commented Mar 28, 2025

I understand the rationale of the change but the problem seems to be more on the side of the runtime that recommends a resolution that is perhaps excessive for the computing power of the machine. What I mean is that recommendedImageRect* should have sensible values and should not require any adjustment.
That's why I think you should better add the code under #ifdef PDFM because the current code is fundamentally correct, and those specifics should be handled as what they are, i.e., exceptions to the norm.

Thank you for the clarification. From the device manufacturer's perspective, they are leveraging 4K screens where a higher EyeBuffer resolution is recommended to fully utilize the display capabilities. While the suggested EyeBuffer size may work smoothly for certain applications, performance issues could arise in heavy-load scenarios. This makes it challenging to define a one-size-fits-all recommendation value across all use cases.

Regarding the code adjustment, yes – my modification already includes a check for PDFM.

Are you proposing to enforce stricter control through macro definitions (i.e., #ifdef PDFM)? If so, I can submit a modification again.

Thanks

Yes, exactly. I know you added a device type check. What I mean is that that should not be normal code flow, the code should not require any adjustment, so if anything is needed then we should do it guarded by an ifdef for the specific flavour of PDFM indeed.

@EasonZxp EasonZxp force-pushed the feature_tuning_eyebuffer_size_on_pfdm_mr branch from e880c42 to 6c7ad8e Compare March 30, 2025 05:52
@EasonZxp EasonZxp changed the title Add a ratio to tuning eyebuffer size & perf setting level on PFDM MR device [PFDM MR] Tuning eyebuffersize & performance level Mar 30, 2025
@EasonZxp EasonZxp changed the title [PFDM MR] Tuning eyebuffersize & performance level Tuning eyebuffersize & performance level on PFDM MR device Mar 30, 2025
@EasonZxp EasonZxp changed the title Tuning eyebuffersize & performance level on PFDM MR device Tunning eyebuffersize & performance level on PFDM MR device Mar 30, 2025
Since the PFDM MR device uses two 4K screens, and the recommended eye buffer
size is 2880x2664, using this recommended eyeBuffer size would cause severe
performance issues, so a ratio is added to reduce the rendering resolution,
and also modify the performance level to High.
@EasonZxp EasonZxp force-pushed the feature_tuning_eyebuffer_size_on_pfdm_mr branch from 6c7ad8e to 1fe7d70 Compare March 30, 2025 05:55
@EasonZxp EasonZxp requested a review from svillar March 30, 2025 05:57
CHECK_XRCMD(OpenXRExtensions::sXrPerfSettingsSetPerformanceLevelEXT(session, XR_PERF_SETTINGS_DOMAIN_CPU_EXT, XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT));
CHECK_XRCMD(OpenXRExtensions::sXrPerfSettingsSetPerformanceLevelEXT(session, XR_PERF_SETTINGS_DOMAIN_GPU_EXT, XR_PERF_SETTINGS_LEVEL_SUSTAINED_HIGH_EXT));
return;
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, this will likely increase the battery consumption and quickly heat up the device. Is it really needed for the rendering of the browser window and the rest of the UI? Note that for XR and fullscreen videos this will be set anyway.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EasonZxp could you comment on what I wrote above please?

@EasonZxp EasonZxp requested a review from svillar April 7, 2025 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[PFDM MR] a performance issue when running on PFDM MR devices
2 participants