Page MenuHomeWildfire Games

Removes CPU lighting after no FFP
ClosedPublic

Authored by vladislavbelov on Jan 13 2021, 12:30 AM.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Commits
rP24599: Removes CPU lighting after no FFP
Summary

FFP removed, so we don't need to spend CPU time on that.

Test Plan
  1. Apply the patch and compile the game
  2. Make sure that everything works as before
  3. Check that CPU lighting doesn't still present somewhere in changed code

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
SeverityLocationCodeMessage
Errorsource/renderer/Renderer.cpp:172CPPCheckBear (returnDanglingLifetime)CPPCheckBear (returnDanglingLifetime)
Errorsource/renderer/Renderer.cpp:178CPPCheckBear (returnDanglingLifetime)CPPCheckBear (returnDanglingLifetime)
Errorsource/renderer/Renderer.cpp:184CPPCheckBear (returnDanglingLifetime)CPPCheckBear (returnDanglingLifetime)
Unit
Unit Tests Skipped
Build Status
Buildable 14960
Build 32296: Vulcan BuildJenkins
Build 32295: Vulcan Build (macOS)Jenkins
Build 32294: Vulcan Build (Windows)Jenkins

Event Timeline

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgraphics_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libgui_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//ForceFeedba

See https://jenkins.wildfiregames.com/job/macos-differential/2816/display/redirect for more details.

vladislavbelov requested review of this revision.Jan 13 2021, 1:07 AM
Stan added a subscriber: Stan.Jan 13 2021, 1:12 AM
Stan added inline comments.
source/renderer/HWLightingModelRenderer.cpp
101

Maybe?

source/renderer/Renderer.cpp
172

False positives ?

553

Maybe this could be way higher in the code, so we don't waste time checking everywhere

  1. Succeeded.
  2. No oddities found.
  3. Grepping for cpuLighting didn't find any occurences ;)
vladislavbelov added inline comments.Jan 13 2021, 8:25 AM
source/renderer/HWLightingModelRenderer.cpp
101

struct, mostly as POD.

source/renderer/Renderer.cpp
172

It'd be right if it'd return const char*, but it returns CStr. So the return value will be constructed before the buf will be destroyed.

553

We're already checking. It's not a regression. Just a notice to validate the place after removing RenderPath::FIXED from real code.

Stan added inline comments.Jan 13 2021, 8:33 AM
source/renderer/HWLightingModelRenderer.cpp
101

What's the advantage of the struct here since there will be only one field? Maybe we should use just the raw pointer everywhere?

source/renderer/Renderer.cpp
172

Ah makes sense

553

Makes sense.

vladislavbelov added inline comments.Jan 13 2021, 8:47 AM
source/renderer/HWLightingModelRenderer.cpp
101

Possible future extension.

Stan added a comment.Jan 13 2021, 2:15 PM

Will it make a profileable difference?

In D3346#148800, @Stan wrote:

Will it make a profileable difference?

No visible differences.

Stan added a comment.Jan 13 2021, 4:32 PM

We're in FF btw

In D3346#148906, @Stan wrote:

We're in FF btw

I've seen, but that patch was already planned, so no problem.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 13 2021, 10:04 PM
This revision was automatically updated to reflect the committed changes.