Commit Graph

259 Commits

Author SHA1 Message Date
Marc Audy
e5bb9b4d0d Integrate all non-branch Engine/Source changes from //depot/UE4-Orion to //depot/UE4
#lockdown Ben.Marsh
#platformnotify Josh.Adams

[CL 2718236 by Marc Audy in Main branch]
2015-10-06 15:59:09 -04:00
Aaron McLeran
679aa4eac1 Merging CL 2715246 and 2715172 from UE4-Orion to UE4-Main
[CL 2715285 by Aaron McLeran in Main branch]
2015-10-02 18:05:52 -04:00
Aaron McLeran
c7cf96bf31 OR-5944 Implementing stereo spatialization for PS4.
- Refactored the PC stereo spatialization code to move shared data and calculations to platform-independent code
- Implemented stereo spatialization on PS4 using the non A3D api
- More work needs to be done to determine A3D support and stereo spatialization

#codereview marcus.wassmer

[CL 2713854 by Aaron McLeran in Main branch]
2015-10-01 19:28:12 -04:00
Marcus Wassmer
8c7861c485 UAV resource transition support. Validation for UAV transitions.
Some RenderTarget validation fixes.

[CL 2708113 by Marcus Wassmer in Main branch]
2015-09-28 14:13:15 -04:00
Martin Mittring
29f89a390c Integrate from Orion
CL 2704794 2704931 2704948 2704962 2705238 2706353 2700643 2705458

        Uniform Buffer layout name

and

more debug info for this and other bugs: OR-7159 CRASH: Client crashed at start of match in D3D11Commands.cpp

Adding OptionalData (key value pairs) to the shaders (to put shader name into the shader code for better debugging), affects all RHI, invalidate DDC key for all shaders, cleanup existing code (was adding 0/1/5 bytes and had to compensate in many areas)

OptionalData:
key is a char, value is up to 255 bytes, up to 64K in total

#platformnotify Josh.Adams

[CL 2706923 by Martin Mittring in Main branch]
2015-09-25 17:34:00 -04:00
Rolando Caloca
4f0573d730 UE4 - D3D12 - Fix crash on machines with > 8 threads
[CL 2705012 by Rolando Caloca in Main branch]
2015-09-24 15:40:22 -04:00
Lina Halper
672ca2554d add null check because of crash
#code review: Marcus.Wassmer

[CL 2703263 by Lina Halper in Main branch]
2015-09-23 16:22:51 -04:00
Max Chen
96a914e2d6 Xaudio2 non unity compile fix. Force line comparison struct.
#codereview Aaron.McLeran

[CL 2702423 by Max Chen in Main branch]
2015-09-23 09:23:26 -04:00
Aaron McLeran
c85bc88870 Implenting a voice pool for XAudio2 voices
- Removing the async DestroyVoice code
- Adding format-based pools
- Created a separate pool for voices that use the spatialization effect (splitting mono-to-stereo) since xaudio2 defaults to a max per-voice effect output channel count equal to the input channel count unless created with an effect chain. Therefore xaudio2 voices that need to use the mono-to-stereo effect need to be created with it.
- Put new pools and related code in FXAudioDeviceProperties since it's the struct we use for xaudio2-specific handles to resources, e.g. IXAudio2, IXAudio2MasteringVoice, etc.
- Added pool shutdown code and moved other xaudio2 shutdown code into the destructor of FXAudioDeviceProperties

[CL 2701170 by Aaron McLeran in Main branch]
2015-09-22 15:09:46 -04:00
Marcus Wassmer
445543fd51 First pass at new RHITransitionResources API.
Rendertarget transitions are completed and validated on DX11 and PS4 RHI's.

[CL 2700116 by Marcus Wassmer in Main branch]
2015-09-21 20:07:00 -04:00
Richard Hinckley
6ceaa5aba7 Cleaning out programmer-only comments that were harvested by Doxygen.
#platformnotify Josh.Adams

[CL 2690143 by Richard Hinckley in Main branch]
2015-09-14 09:25:39 -04:00
Aaron McLeran
804890765c Updating Oculus Audio plugin
- Changing the way the Oculus Audio plugin deals with parameter passing, rather than using CXAPOParameterBase, we do our own parameter passing now.
- Removing COM ref counting in case of double-stopping and premature destruction

[CL 2688262 by Aaron McLeran in Main branch]
2015-09-11 13:07:31 -04:00
Martin Mittring
81a3824fa4 Changed default SamplerState anisotropy from 0 (use cvar setting) to 1 prevent accidential use of anisotropy which could cost performance and cause artifacts.
Other minor refactorings.

[CL 2688164 by Martin Mittring in Main branch]
2015-09-11 12:05:05 -04:00
Aaron McLeran
d5f4f3c9d7 Merging CL 2686647 from UE4-Orion to UE4
[CL 2686698 by Aaron McLeran in Main branch]
2015-09-10 14:06:01 -04:00
Dmitriy Dyomin
e99d6caf62 Fixed: Crash on Mobile Previewing or Playing #jira UE-20639
FCaptureRenderTarget does not allocate target texture
#codereview Marcus.Wassmer

[CL 2682139 by Dmitriy Dyomin in Main branch]
2015-09-06 23:57:45 -04:00
Mark Satterthwaite
d82b11bdc3 Enable GRHISupportsMSAADepthSampleAccess for additional platforms which support it.
[CL 2670876 by Mark Satterthwaite in Main branch]
2015-08-27 10:21:32 -04:00
Mark Satterthwaite
977542aeaa Merging general rendering & shader changes necessary to support desktop Metal.
reviewedby michael.trepka, rolando.caloca, lee.clark

[CL 2670859 by Mark Satterthwaite in Main branch]
2015-08-27 10:11:22 -04:00
Marc Audy
4734011e47 Fix AudioComponent direct accesses
[CL 2663135 by Marc Audy in Main branch]
2015-08-20 14:16:03 -04:00
Marc Audy
039f479ac9 Optimize FAudioDevice::FindActiveSound by eliminating large numbers of Weak Object Ptr comparisons
Privatize FActiveSound::AudioComponent. Use Get/SetAudioComponent instead.

[CL 2662901 by Marc Audy in Main branch]
2015-08-20 12:26:11 -04:00
Aaron McLeran
f87df2865a OR-5962 Adding new feature: global pitch shift
- New gameplay static function that will set a global pitch value
- An optional paramter can be given which will interpolate the current global pitch value to the new target value over time
- Non-UI sounds will be pitched
- This is a PC-only implementation, other platforms will follow once this feature is confirmed to be sufficient

[CL 2661592 by Aaron McLeran in Main branch]
2015-08-19 16:23:04 -04:00
Aaron McLeran
5a01ef76fa UE-20133 Fixing async destroy voice crash
- Moving the async worker thread declaration and implementation to be inside XAudio2Device.cpp
- Added a threadsafe counter to track the number of in-flight async destroy-voice calls per audio device
- Blocked the call to tear-down the audio device until all in-flight destroy-voice calls occur.
- Should rarely actualy block but this will prevent Xaudio2 from shutting down before an XAudio2 source get "Destroy" called on it. If a block does occur on shutdown, will only be for a neglible time.
- Wasn't able to repro after rigorous and prolonged audio start/stop spammage in the blueprint editor.

[CL 2660265 by Aaron McLeran in Main branch]
2015-08-18 19:22:17 -04:00
Aaron McLeran
f740d3c683 Stereo Spatialization Feature
- PC/Xaudio2 implementation

- Added new parameter added to sound attenuation object that specifies stereo spread for 3d spatialized assets that use the attenuation setting

- High-level implementation description: split the stereo file channels into 2 mono-source 3d calculations in XAudio2 (though the stereo voice still counts as a single voice).

- Currently HRTF spatialization only works for mono-sources.

- The L/R channels are oriented perpendicular to the listener and spread from each other by the spread parameter.

- Added the ability to visualize 3d audio using
   -- the new audio command is "Audio3dVisualize", we can change the name to something else if there's a different name designers would like to use
   -- 3d visualization will show the name of the wave instance, a white crosshair where the emitter position is, and a red/green crosshair for the left/right channels. This way sound designers can
      visualize the spread parameter. The position used to display the crosshairs is the exact position used by the audio engine to spatialize the channels.
   -- We can add more data to this visualization later(can display current volume, color based on occlusion, etc)
   -- If the sound is mono-spatialized, it will only display a white crosshair (and the name of the wave instance).
   -- It only shows actively playing voices that have audio components (to render into the component's world) so can be used as a means to determine playback activity of audio components.
   -- Only implemented for PC at the moment, though this feature should be ported to our other platforms

[CL 2660161 by Aaron McLeran in Main branch]
2015-08-18 18:27:16 -04:00
Rolando Caloca
31bd1a0baf UE4 - D3D12 - Fix for infiltrator flickering colors
[CL 2653156 by Rolando Caloca in Main branch]
2015-08-12 14:14:30 -04:00
Rolando Caloca
6b9824849f UE4 - D3D12 - Integrate SRV renaming fix and backbuffer format
[CL 2651354 by Rolando Caloca in Main branch]
2015-08-11 13:18:54 -04:00
Aaron McLeran
9fff1159f8 UE-19864 Fixing hitching/blocking of main thread when XAudio2 calls DestroyVoice on an XAudio2 source object.
#codereview marc.audy

[CL 2650233 by Aaron McLeran in Main branch]
2015-08-10 18:16:03 -04:00