metal

https://developer.apple.com/library/archive/documentation/3DDrawing/Conceptual/MTLBestPracticesGuide/LoadandStoreActions.html

https://docs.unity3d.com/ScriptReference/Rendering.RenderBufferLoadAction.html

当前rt选 load 会导致之前一个pass的内容 从system mem copy到 当前tile mem

当前rt 选store 会导致当前pass 内容 从tile 到system mem copy

dont care 没有上述开销

和msaa相关的有

storeAndMultisample 后面那 个flag涉及resolve相关会生成resolve tex

multisample content和resolvecontent都会保存

==============

rtt的 action 设置为 clear/store 因为它之后会被采样

还要往之前rt上画的 action load/store (store以后会有对它的采样

这样 我们管线里应该尽量去掉load

用clear /store (会被采样

或者 clear/dontcare(不会做rtt被采样

======================

memoryless就是字面意思 是rendertexture的一个属性 关掉action store只有tile memory, rtt sample就会失效了

https://docs.unity3d.com/ScriptReference/RenderTextureDescriptor-memoryless.html

So basically what your script is doing (Without memoryless flag):
ViewCamera renders scene objects into renderTexture
- Camera does storeAction to save renderTexture from tile memory to system memory
- Then renderTexture system memory copy is used as shader resource for ViewMonitor
- Lastly some other camera renders ViewMonitor (Where u probably use for testing if it works or not)

Once u enable the memoryless flag, storeAction cannot be done as renderTexture doesn't have system memory for it. So that leads that renderTexture will stay to the color it was created (Most likely gray - internally we even ignore all memoryless rendertexture setting on materials as it is not valid).

https://docs.unity3d.com/ScriptReference/RenderTexture-memorylessMode.html

https://forum.unity.com/threads/how-to-use-memoryless.491167/

所以这个memoryless对平常的管线来说 如果不是做single pass deferred rendering这种是没用的 只在tile上

或者msaa也能用到这个(这里理解起来有点绕,可以认为是4x那个不入systemmem 所以是memoryless 1x那个是另外 resolve又写入的 用multisampleResolve做到 经测试 正确)

Render texture color pixels are memoryless when RenderTexture.antiAliasing is set to 2, 4 or 8.

https://docs.unity3d.com/ScriptReference/RenderTextureMemoryless.MSAA.html

rendertexture.antialiasing是sample 数量

================

load action

  • If all the render target pixels are rendered to, choose the DontCare action. There are no costs associated with this action, and texture data is always interpreted as undefined.

  • If the previous contents of the render target do not need to be preserved and only some of its pixels are rendered to, choose the Clear action. This action incurs the cost of writing a clear value to each pixel.

  • If the previous contents of the render target need to be preserved and only some of its pixels are rendered to, choose the Load action. This action incurs the cost of loading the previous contents.

所以这里选Dont care 我们把要load的rt都做掉了,扰动那些要选clear

store action

第一遍不处理msaa的情况 这里选store 因为都要被srv(之后只用tile的和msaa 只用resolve的会选其它action)

depth stencil选dont care

storage mode

因为还没有做singlepass所以也不用memoryless 如果是memoryless意味着没有gpu cpu mem 只有tile mem能省 footprint

=============對於msaa rt 有額外兩種 store action可以 處理 resolve 前後的兩張rt 的store action

srotreAndMultisampleResolve會保存兩種 5x 帶寬

MultisampleResolve 1x帶寬

store 4x帶寬

因爲要用來做srv我們應該選2 把4x那張帶寬和footprint去掉 ios推薦4xmsaa A11

====================

刚刚做到了个很了不起的事情 很开心

我可以设置 mrt 的两张msaa targets和depth target 的load action 和store action

用event cmd --after depth

中间发现个事情 mrt msaa 对应的depth target似乎就是1 sample 不是我之前以为的4

我刚刚降了2G的带宽/s 80M/fra

ios上最终要做到40M/frame

一点都不热

Load store and memoryless的更多相关文章

  1. vulkan load store and memoryless

    https://www.jendrikillner.com/article_database/ https://community.arm.com/developer/tools-software/g ...

  2. msaa mrt load store action unity

    unity buildin renderpipeline 和lightweight rp 对于开了msaa的rt 的load store action设置失效 buildin的时候set render ...

  3. Load store action in vulkan & ogles 的解决方案

    metal的带宽之前的blog有讲 这篇主要是vulkan 和ogles的解决方案 https://www.khronos.org/registry/vulkan/specs/1.1-extensio ...

  4. 批量Load/Store指令的寻址方式

    批量Load/Store指令用于实现在一组寄存器和一块连续的内存单元之间传输数据.也称为多寄存器寻址方式,即一条指令可以完成多个寄存器值的传送.这种寻址方式可以用一条指令最多完成传送16个通用寄存器的 ...

  5. Unordered load/store queue

    A method and processor for providing full load/store queue functionality to an unordered load/store  ...

  6. unity里blit的load store action设置

    做blit的 load store action时 用 setrendertarget做 之后blit 参数用 BuiltinRenderTextureType.CurrentActive https ...

  7. 对Extjs中store的多种操作

    Store.getCount()返回的是store中的所有数据记录,然后使用for循环遍历整个store,从而得到每条记录. 除了使用getCount()的方法外,还可以使用each()函数,如下面的 ...

  8. Extjs4中的store

      Extjs 4引入新的数据包,其中新增了不少新类并对旧有的类作出了修整.使数据包更强大和更容易使用.  本章我们将学习一下内容: 2.1. 概述新特性      Extjs4的数据包引入了如Mod ...

  9. ExtJs Ext.data.Store 处理

    var storeCpye = new Ext.data.GroupingStore({ proxy : new Ext.data.HttpProxy({ url : 'cxgl_cpye.app?d ...

随机推荐

  1. 32.网络编程TCP/UDP服务

    网络编程TCP: 服务器端口了解: port:0~65535 web服务:80 邮箱服务:556 0~1024:为服务默认的公认端口,一般我们不能用 套接字:socket socket作用 ip:po ...

  2. 解决从github上下载代码仓库慢的问题

    一,打开命令提示符,最好之前准备一个仓库地址,这样下载下来的文件方便查看,这里打开你想要的下载根目录,进行下载. github上下载代码仓库慢的问题"> 二:复制代码仓库的地址 三:右 ...

  3. 洛谷 题解 P2280 【[HNOI2003]激光炸弹】

    一道很好的二维前缀和模板题. 什么是二维前缀和? 从这张图可以看出前缀和的求法: Map[i][j]=Map[i-1][j]+Map[i][j-1]-Map[i-1][j-1]+Map[i][j]; ...

  4. Javascript 数组转无限级分类

    递归 var arr = [ {"id":1,"parent_id":0,"name":"Foods"}, {" ...

  5. UWP笔记-消息弹窗自动淡出

    为了让用户有个更好的UI交互,可以增加自动淡出的消息弹窗,例如:网易云音乐UWP,切换播放模式时,出现的类似消息提示. 右键项目,添加用户控件 UserControlDemo.xaml: <Us ...

  6. Spring mybatis源码篇章-Mybatis主文件加载

    通过阅读源码对实现机制进行了解有利于陶冶情操,承接前文Spring mybatis源码篇章-SqlSessionFactory 前话 本文承接前文的内容继续往下扩展,通过Spring与Mybatis的 ...

  7. CREATE TABLE——数据定义语言 (Data Definition Language, DDL)

    Sql语句分为三大类: 数据定义语言,负责创建,修改,删除表,索引和视图等对象: 数据操作语言,负责数据库中数据的插入,查询,删除等操作: 数据控制语言,用来授予和撤销用户权限. 数据定义语言 (Da ...

  8. ssm+reids缓存整合

    在说正文之前我们先介绍一下redis: redis是当今比较热门的非关系型数据库之一,他使用的是key-value的键值对来进行存储,是一个存在于内存之中的数据库,我们一般用于做数据缓存.当我们需要大 ...

  9. 【Funny Things】002——鞋的颜色

    网上的那张鞋子的图片到底是什么颜色的?灰绿色还是粉色? 1. 先截取图片中鞋的那块的图片,获取大小 2. 带入大小分别计算R,G,B平均值 3. 通过计算所得的数据画图可得结果 from PIL im ...

  10. Linux系列(13)之程序与服务的概念

    知道如何区分程序与进程吗? 知道如何产生进程吗? 知道进程之间的相关性吗? 知道进程调用的流程吗? 知道进程与服务的区别吗? 1.程序与进程的区别 bash就是一个程序,当我们登录之后系统就会给我们分 ...