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

5 -> 6 (main) #350

Merged
merged 21 commits into from
Jun 22, 2021
Merged

5 -> 6 (main) #350

merged 21 commits into from
Jun 22, 2021

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jun 22, 2021

➡️ Forward port

Port ign-rendering5 to main

Branch comparison: main...ign-rendering5

Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

darksylinc and others added 20 commits June 8, 2021 19:58
Fixes #332
Fixes #108

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
* Fix floating point precision bug handling alpha channel (#332)

Fixes #332
Fixes #108

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* test reenabling depth camera test on mac

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

Co-authored-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
Using a custom deallocator to avoid breaking ABI

Alternatively C++17 supports the following syntax, which was not used:

`typedef std::shared_ptr<unsigned char[]> DataPtr;`

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
PF_RGB is 3 bytes. But later on Ogre2SelectionBuffer::OnSelectionClick
will try to read 4 bytes from it.

Fixed by ensuring it's always at least 4 bytes and zero-initializing
those 4 bytes.

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>
Fixes #332
Fixes #108

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>
* update test

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* reenable macos test

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* fix typo

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
* Fix FSAA in UI and lower VRAM consumption

FSAA was being requested however due to how the compositor was setup,
this effect was not taking effect.

Additionally, the Compositor setup was improved to lower memory
consumption. Originally the setup was taken from Ogre samples which
assume they will ultimately be rendering to a window.

However this is not the case and thus IGN was creating 3 render targets
(two for ping-ponging between postprocess FXs + one for storing the
final result)
This was optimized so that we only create 2 render targets: two for
ping-ponging between postprocess FXs and we pick at runtime which one is
storing the final result via the new variable renderTargetResultsIdx

Further performance optimizations could be made in Ogre 2.2 to improve
unnecessary MSAA resolving when doing postprocess, though considering
there's currently only one postprocessing effect (the Gaussian filter) I
doubt this optimization would make much of a difference

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Add Ogre2RenderTarget::RenderTarget back

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Rewrote the compositor changes to support RenderWindows

As a bonus this new method breaks ABI far less.
Fix leak: DestroyCompositor would often not be called

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Mantain ABI compatibility #Ogre2IsRenderWindowABI

When merging to newer branches that can break the ABI,
revert this commit

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Fix ABI problems

I gave up on commit undoing

It's clear that on the next release, Ogre2RenderTarget and
Ogre2RenderTexture need to be merged together.

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Fix camel case convention

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Make Ogre2RenderTarget::RenderTarget pure virtual again

Hopefully this will prevent ABI breakage

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Fix deprecation warnings during build

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

* Fix invalid write of size 8

This was causing heap corruption. At best it would crash. At worst it
would manifeset in subtle weird behaviors

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>
* Fix heap overflow when reading (#337)

PF_RGB is 3 bytes. But later on Ogre2SelectionBuffer::OnSelectionClick
will try to read 4 bytes from it.

Fixed by ensuring it's always at least 4 bytes and zero-initializing
those 4 bytes.

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

Co-authored-by: Ian Chen <ichen@osrfoundation.org>

* Fix new [] / delete mismatch (#338)

Using a custom deallocator to avoid breaking ABI

Alternatively C++17 supports the following syntax, which was not used:

`typedef std::shared_ptr<unsigned char[]> DataPtr;`

Signed-off-by: Matias N. Goldberg <dark_sylinc@yahoo.com.ar>

Co-authored-by: darksylinc <dark_sylinc@yahoo.com.ar>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
* apply changes

Signed-off-by: Ian Chen <ichen@osrfoundation.org>

* remove line

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Louise Poubel <louise@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Jun 22, 2021
@codecov
Copy link

codecov bot commented Jun 22, 2021

Codecov Report

Merging #350 (f28a55f) into main (b0c9523) will decrease coverage by 0.01%.
The diff coverage is 82.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #350      +/-   ##
==========================================
- Coverage   57.94%   57.92%   -0.02%     
==========================================
  Files         166      166              
  Lines       16385    16433      +48     
==========================================
+ Hits         9494     9519      +25     
- Misses       6891     6914      +23     
Impacted Files Coverage Δ
ogre2/src/Ogre2RenderTargetMaterial.cc 0.00% <0.00%> (ø)
ogre2/src/Ogre2RenderTarget.cc 81.25% <79.83%> (-2.37%) ⬇️
ogre2/src/Ogre2DepthCamera.cc 90.98% <93.75%> (-0.67%) ⬇️
ogre2/src/Ogre2SelectionBuffer.cc 79.68% <100.00%> (+0.32%) ⬆️
src/Image.cc 84.61% <100.00%> (+2.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0c9523...f28a55f. Read the comment docs.

Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 merged commit 8c34f9d into main Jun 22, 2021
@iche033 iche033 deleted the merge_5_6_062121 branch June 22, 2021 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants