TBDR下msaa 在metal vulkan和ogles的解决方案
https://developer.arm.com/solutions/graphics/developer-guides/understanding-render-passes/multi-sample-anti-aliasing
msaa在local mem上做很省但是 带宽不处理多出8x 对于4xmsaa
计算如下
处理前
python
bytesPerFrame4x = 2560 * 1440 * 4 * 4
bytesPerFrame1x = 2560 * 1440 * 4 * 1 # Additional 4x bandwidth is doubled because the additional samples
# are written by one pass and then re-read to resolve the final color
bytesPerFrame = ((bytesPerFrame4x * 2) + bytesPerFrame1x)
bytesPerSecond = bytesPerFrame * 60
= 7.9 GB/s
处理后
python
bytesPerFrame1x = 2560 * 1440 * 4 * 1 # All additional 4x bandwidth is kept entirely inside the tile memory
bytesPerSecond = bytesPerFrame1x * 60
= 884 MB/s
处理的方法就是load store action选一共1x那种
vulkan和metal都可以这样处理 之前有发blog
https://www.cnblogs.com/minggoddess/p/10950349.html
vulkan还要用
using VK_MEMORY_PROPERTY_LAZILY_ALLOCATED_BIT
and constructing the VkImage
with VK_IMAGE_USAGE_TRANSIENT_ATTACHMENT_BIT
.做memoryless
metal直接设置memoryless
对于
ogles
用如下扩展
[EXT_multisampled_render_to_texture][EXT_msaa] extension
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_multisampled_render_to_texture.txt
This extension introduces functionality to perform multisampled
rendering to a color renderable texture, without requiring an
explicit resolve of multisample data.
Some GPU architectures - such as tile-based renderers - are
capable of performing multisampled rendering by storing
multisample data in internal high-speed memory and downsampling the
data when writing out to external memory after rendering has
finished. Since per-sample data is never written out to external
memory, this approach saves bandwidth and storage space. In this
case multisample data gets discarded, however this is acceptable
in most cases.
自动resolve不用显示resovle了 在tile上还可以省3x store 和footprint
FramebufferTexture2DMultisampleEXT
RenderbufferStorageMultisampleEX
还有depthstencil的
所有tbdr下这套解决方案 在ogles 要用extension unity有实现 之后会验下数据
memoryless其实是个metal和vulkan才有的概念
msaa情况下完全对应上面这个扩展1x store ok了
unity里面根据rendertexture的descriptor
antiAliasing会自动开这个扩展相关代码 glRenderbufferStorageMultisample
======================
unity里面对msaa自动开了 glRenderbufferStorageMultisample
这需要capabilities HasMultisample
ogles3 或者
HasMultiSampleAutoResolve 这个capa对应以下两个扩展
kGL_EXT_multisampled_render_to_texture
kGL_IMG_multisampled_render_to_texture
force-clamped是啥
kGL_EXT_multisampled_render_to_texture
glRenderbufferStorageMultisampleEXT
glFramebufferTexture2DMultisampleEXT
Mali用的这组
kGL_IMG_multisampled_render_to_texture
glRenderbufferStorageMultisampleIMG
glFramebufferTexture2DMultisampleIMG
kGL_APPLE_framebuffer_multisample
glRenderbufferStorageMultisampleAPPLE
glResolveMultisampleFramebufferAPPLE
有metal这个不用管了
kGL_NV_framebuffer_multisample
kGL_NV_framebuffer_blit
glRenderbufferStorageMultisampleNV
-------
----------------------------------------------------
下面就是profiler的数据了 这部分好诡异 好难理解
开了msaa
read memory和write mem 大幅下降 如果只是shaderbusy也说不通 这个降幅
--snapdragon845
和后处理有关 应该和msaa没什么关系
最新文章
- Bootstrap学习之起步
- How To Use Hbase Bulk Loading
- centos安装mysql5.6的正确姿态
- 2.cocos2dx 3.2在语法的差异,lambada使用表达式和function和bind使用功能
- SQLServer访问Oracle查询性能问题解决
- JAVA的Executor框架
- 201521123121 《Java程序设计》第5周学习总结
- instanceof 原理
- 洛谷P2402 奶牛隐藏(网络流,二分答案,Floyd)
- 20175311 2018-2019-2 《Java程序设计》第五周学习总结
- 11Linux_sshd_Apache
- bootloaderd的再解析
- 第一章 C++语言入门
- List,set,Map理解
- Linux系统加固
- AlexNet
- 反射中的BindingFlags
- [CentOS7] [VMWARE] 增加磁盘空间后扩大逻辑分区
- NHibernate初学六之关联多对多关系
- mnesia怎样改动表结构