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. Mysql性能优化之---(二)

    建立适当的索引 说起提高数据库性能,索引是最物美价廉的东西了.不用加内存,不用改程序,不用调sql,只要执行个正确的'create index',查询速度就可能提高百倍千倍,这可真有诱惑力.可是天下没 ...

  2. jq+js获取到table标签中的value

    前端jsp页面,(这里接收后端的参数方式没有放在上面) <table> <tbody id="fPzQwQwzbrList"> <tr id=&quo ...

  3. private关键字 this关键字

    基本类型的布尔值boolean定义get方法,名称应该为isMale 当方法的局部变量和类的成员变量重名的时候,根据就近原则,有限使用局部变量, 如果需要访问成员变量  则使用this.name 构造 ...

  4. [bzoj3060][Poi2012]Tour de Byteotia_并查集

    [Poi2012]Tour de Byteotia 题目链接:https://www.lydsy.com/JudgeOnline/problem.php?id=3060 题解: 这类题有一个套路,就是 ...

  5. fiddler模拟发送请求和响应

    iddler模拟发送请求和响应 一.fiddler模拟发送请求 1.fiddler模拟发送get请求 1)例如:访问博客园https://www.cnblogs.com/,并且登录输入密码账号登录,再 ...

  6. SQLite进阶-19.常用函数

    目录 SQLite常用函数 SQLite常用函数 SQLite 有许多内置函数用于处理字符串或数字数据. 序号 函数 & 描述 1 SQLite COUNT 函数SQLite COUNT 聚集 ...

  7. ~ android与ios的区别

    Oracle与Mysql的区别 项目类别 android ios 应用上 可以使用常用的android模拟器,来模拟各种android设备 只能直接使用iphone或ipad进行测试 开发语言 基于L ...

  8. PowerShell 反弹渗透技巧

    Windows PowerShell 是一种命令行外壳程序和脚本环境,使命令行用户和脚本编写者可以利用 .NET Framework的强大功能,并且与现有的WSH保持向后兼容,因此它的脚本程序不仅能访 ...

  9. 在Linux上安装和配置CSF(配置服务器安全和防火墙)

    CSF是国外一家小公司开发的linux系统免费防火墙,它基于iptables工作,能有效缓解服务器压力,具有自动屏蔽暴力破解密码IP.管理开放端口.免疫轻量DDos和CC等等功能,同时,安装和使用也极 ...

  10. 简单分析FactoryBean

    1. 什么是FactoryBean FactoryBean本质上是一种Bean,只是它可以产生其他的Bean,比较特殊.在上下文getBean的时候,如果传入FactoryBean的名称,得到的是Fa ...