Skip to content

Conversation

@cgutman
Copy link
Collaborator

@cgutman cgutman commented Jan 13, 2023

Description

The implementation of display_vram_t::convert() was using a pre-allocated black ARGB dummy image to fill the entire image every frame. This effectively means we're doing 2x the amount of work in convert() than we should be, because we end up doing RGB->YUV on the dummy image, then doing RGB->YUV on the actual image data to draw right on top of the black image we just drew.

The result is a bunch of extra draw calls, state changes, mutex acquisition, etc. for every frame. We can replace all this work with a couple of ClearRenderTargetView() calls when we initially create the image.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher ReenigneArcher merged commit 9fe539f into LizardByte:nightly Jan 15, 2023
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.

2 participants