Commit Graph

63 Commits

Author SHA1 Message Date
Zeqiang Li d2508691e4 dsiable type validator (#10784)
* dsiable type validator

* add comment

Co-authored-by: Zeqiang Li <zeqiang-li@outlook.com.com>
2022-04-16 20:02:41 +08:00
Zeqiang Li c11221820d disable ds pipeline validation (#10701) 2022-04-11 15:03:49 +08:00
Yiwen 718ea8ee3f Add a method to select mipmap range for Texture2D and TextureCube. (#10500)
* Add a feature to select mipmap range to image asset.

* fix format

* fix format

* modify comments, remove uncessary methods

* finx comments.

* fix logic problem

* fix mipmap range problems

* Add validation information incase someone wants to generate mipmap for compressed texture

* remove some validations to make gfx bakend clear

* fix a stupid typo

* Add validation information for setMipRange

* use assertID to validate the mipmap range
2022-03-27 13:52:24 +08:00
Cocos Robot 30b7591b28 [ci skip][AUTO]: Automated clang-format update: 508dd40734e2e9e59a002f0f79482bf2831ad5d9 (#10359) (#10378)
Co-authored-by: cocos-robot <cocos-robot@cocos.com>
2022-03-17 11:08:26 +08:00
Zeqiang Li 6cdaf450e3 fix crash by incorrect hash ---- autotest (#10359)
* fxi crash by incorrect hash
2022-03-17 10:12:51 +08:00
Yiwen b2ec8b022f select mipmap levels dynamically (#10096)
* draft

* fix some stupid bugs introduced in the lase commit

* fixed bug when init webgl's texture.

* draft

* fix some bugs

* fix some warnings

* fix undefined type cast

* For Vulkan device, query the storage feature through optimal tiling instead of linear tiling.

* fix some bugs appear when resize texture, clean the changes. all tests passed.

* remove debug codes, improve performance, correct the framebuffer size.

* make some input parameters readonly

* Make the gfx function's parameter's access priority the same as native engine

* remove uncessary members and interface for ES3, move getGLSampler into IWebGL2GPUSampler, delete WebGL2CmfFuncCreateSampler...
2022-03-02 10:15:34 +08:00
Zeqiang Li d31520c10b v3.4.2 -> V3.5.0 (#10199)
* 3.4 wgpu rebase (#4208)

Co-authored-by: Zeqiang Li <zeqiang-li@outlook.com.com>

* spirv incorrect name on binding (#4259)

Co-authored-by: Zeqiang Li <zeqiang-li@outlook.com.com>
2022-03-01 09:55:52 +08:00
Yun Hsiao Wu 198034ec2c refactor access type array to access flags (#10103) 2022-02-16 09:56:46 +08:00
Yun Hsiao Wu 2902e37d52 more validations (#4230) 2022-02-08 10:31:29 +08:00
Yiwen 8e81f9cfdb add a new interface to query format feature info (#4169)
* create a seperated branch to solve the Issue 8203

* Add format feature for query

* fix bugs and add formatFeature info for metal backend.

* 1. fix some bugs; 2. correct some condition judgements; 3. remove some uncessary comments;

* fix a bug of textureExclusive, fix some typos.

* clean the code, correct some formatFeatures.

* fix bugs in metal backend, fix bugs found on windows.

* Use a proper log funciton in DeviceValidator. Fix code format.

* fix perfect-forwarding in CondVar interface
2022-01-25 19:02:33 +08:00
minggo f08555248f fix conflict 2022-01-24 17:23:03 +08:00
Yun Hsiao Wu 14a17c9d22 license upgrade (#4210) 2022-01-24 17:18:47 +08:00
Yun Hsiao Wu a360e4390a gfx: refactor binding mappings (#4195)
* gfx: refactor binding mappings

* fg: fix scissor merge

* fix genbindings on PyYAML 6.0+
2022-01-21 09:43:55 +08:00
minggo 0db30a6523 merge develop 2021-12-07 15:26:33 +08:00
Yun Hsiao Wu b213048245 fix forward pass initial layout (#4081)
* fix forward pass initial layout

* fix swapchain props not propagated back

* reset to default surface whenever binding contexts
2021-12-06 09:59:58 +08:00
minggo fd05eb4c34 fix compiling error 2021-11-30 15:53:33 +08:00
minggo ac7418f1c1 fix conflict 2021-11-30 10:48:30 +08:00
oahcy 5379e6ef35 引擎适配linux平台 (#4035) 2021-11-29 17:17:15 +08:00
Yun Hsiao Wu 34c4bf7373 draw profiler only once 2021-11-11 15:56:43 +08:00
Yun Hsiao Wu 82519dc245 unify dynamic offset behavior 2021-11-11 15:56:43 +08:00
Yun Hsiao Wu 31bf96a0c5 validate buffer size against stride 2021-11-11 15:56:43 +08:00
Yun Hsiao Wu 30437372f6 gfx: leave resize logic to the underlying backends
For there is no unified way to reliably manage the process across
backends. Right from the beginning the input information from system
event is just not reliable enough to be used as ground truth.

This also means the asynchronicity between device & render threads will break
whenever a resize event happens.
2021-11-11 15:56:43 +08:00
Yun Hsiao Wu 8647d75b24 use renderbuffer for non-sampling textures 2021-11-11 15:56:43 +08:00
Yun Hsiao Wu 2984594f96 gfx: onAcquire callback (#4038) 2021-11-11 10:15:26 +08:00
Yun Hsiao Wu ed77f18027 misc fixes (#4013)
* sampler wrap mode validation

* fg: fewer hashing per frame

* better interface names for query pool

* auto update fbo after rt resize

so that the framegraph reuse logic can work
2021-10-28 09:45:38 +08:00
Yun Hsiao Wu de153fd3f5 misc fixes (#3998)
* assert on zero-sized buffer/texture

* fix gl sampler creation under device thread
2021-10-21 09:49:55 +08:00
李吉林 859974a4ca V3.4.0 metal occlusion query (#3993)
* add occlusion query for metal and defer
Co-authored-by: lijilin <jilin.li@cocos.com>
2021-10-19 18:26:49 +08:00
Yun Hsiao Wu 0e713cb6a4 render area affects viewport only (#3992)
* more validations

* render area affects viewport only
2021-10-19 18:26:13 +08:00
Yun Hsiao Wu dbcb157efb misc gfx fixes (#3991)
* better hashing strat

* gfx: unify states hash

* vk: upload texture in multiple chunks if needed

* gfx: states lifecycle management
2021-10-19 14:14:46 +08:00
李吉林 bed27fcccf V3.4.0 occlusion query2 (#3975)
* occlusion query
Co-authored-by: lijilin <jilin.li@cocos.com>
2021-10-13 18:21:03 +08:00
Yun Hsiao Wu 8f8569f39e gfx: better hashing strategies (#3969) 2021-10-13 16:03:58 +08:00
江战 b5a846de86 save (#3944) 2021-09-30 09:09:26 +08:00
Yun Hsiao Wu 27e5a5630f fix orientation change (#3940) 2021-09-29 14:13:16 +08:00
Yun Hsiao Wu 2dd9263085 remove resizable flag (#3908)
* misc fixes

* remove resizable flag
2021-09-23 18:34:31 +08:00
江战 5074a5a826 V3.4.0 usec++14 (#3898)
This reverts commit fff4cc8fc94fb9b1a8424a2b89e9966184c6c4ce.
2021-09-18 13:53:58 +08:00
Yun Hsiao Wu 3d1b6f9835 misc fixes (#3895) 2021-09-17 11:42:19 +08:00
Yun Hsiao Wu 89131fad2d GL: better subpass support (#3887)
* vk: better subpass dependency deduction

* GL: better subpass support

* uint -> uint32_t

* officially make viewport/scissor dynamic by default

* gfx: states store hashes

* gfx: defend against usages after destroy
2021-09-16 09:43:26 +08:00
Yun Hsiao Wu d4441705e6 unify gfx resize event (#3875) 2021-09-09 16:00:21 +08:00
Yun Hsiao Wu 2134db8c4e fix fg exec storage (#3865)
* fix swapchain resize

* fix fg exec storage
2021-09-06 15:28:57 +08:00
Yun Hsiao Wu 47305ec5c5 GL: smarter framebuffer cache (#3860) 2021-09-01 20:47:54 +08:00
Yun Hsiao Wu da2f03ff73 gfx: swapchain refactor (#3751)
* gfx: swapchain

* acquire/release/surface on swapchain

* fix swapchain texture creation

* acquire/present back on device

* formats are swapchain-specific

* swapchain: vk works

* enable device agent

* format fix

* update gfxdef

* fix enum decl

* pipeline adapt

* minor

* vk: compress attr locations directly in SPIR-V

* gles3 adjust

* InputAssembler owns an DrawInfo

* gles2 adapt

* texture keep track of its hash

* device cached states

* format

* glslang finalize

* buffer view adapt

* fg: subpass support

* minor

* 3.4 adapt

* profiler adapt

* buffer update frequency detection

* minor

* base commit

* swapchain works on metal

* spirv

* mtltexture issue

* remote test code

* depthtexture

* revert ifdef USE_METAL

* ios swapchain header

* fix some triple buffer issues

* resize accept surface transform

Co-authored-by: Zeqiang Li <Zeqiang-li@outlook.com>
2021-08-31 19:40:32 +08:00
Yun Hsiao Wu 6759192f56 fix command buffer validator cache (#3837) 2021-08-17 18:41:38 +08:00
Yun Hsiao Wu 2056271bac misc pipeline fixes (#3811) 2021-08-10 09:49:18 +08:00
江战 4d2d4d82b5 3.3 some optimization (#3765) 2021-07-27 13:40:02 +08:00
Zeqiang Li e2895b248d V3.3.0 (#3715) 2021-07-15 15:08:02 +08:00
ref-ptr d7181c8dc2 Add api to copy texture to cpu memory (#3710) 2021-07-15 10:26:50 +08:00
Yun Hsiao Wu d7db4dc817 gfx: resolve attachments (#3684) 2021-07-06 14:02:59 +08:00
Yun Hsiao Wu b2fe7ba5c9 gfx: sRGB texture support (#3619) 2021-06-17 18:10:06 +08:00
Yun Hsiao Wu 5ad7eae494 update vk libs (#3612) 2021-06-15 15:06:55 +08:00
Zeqiang Li 219ec21abf remove nativeSize() interface (#3590) 2021-06-09 09:54:55 +08:00