DX12
CD3DX12_DESCRIPTOR_RANGE1
的baseShaderRegister
用来指定 t0 t1 b0 b1...的index
t0 srv
b0 constant buffer
u0 uav
这个的名字叫 hlsl bind slot
还有个index 叫 API bind slot
pCmdList->SetComputeRoot32BitConstant(0,seed); // 0 is the parameter index,--api bind slot
=============
Descriptor GPU资源的描述信息
Descriptor Heaps
Descriptor Tables
可以快速申请,因为只是标记(memory 地址)
CD3DX12_DESCRIPTOR_RANGE1 DescRange[6]; DescRange[0].Init(D3D12_DESCRIPTOR_RANGE_SRV,6,2); // t2-t7
DescRange[1].Init(D3D12_DESCRIPTOR_RANGE_UAV,4,0); // u0-u3
DescRange[2].Init(D3D12_DESCRIPTOR_RANGE_SAMPLER,2,0); // s0-s1
CD3DX12_ROOT_PARAMETER1 RP[7]; RP[0].InitAsConstants(3,2); // 3 constants at b2
RP[1].InitAsDescriptorTable(2,&DescRange[0]); // 2 ranges t2-t7 and u0-u3
CD3DX12_STATIC_SAMPLER StaticSamplers[1];
StaticSamplers[0].Init(3, D3D12_FILTER_ANISOTROPIC); // s3
CD3DX12_STATIC_SAMPLER StaticSamplers[1];
StaticSamplers[0].Init(3, D3D12_FILTER_ANISOTROPIC); // s3
CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC RootSig(7,RP,1,StaticSamplers);
ID3DBlob* pSerializedRootSig;
CheckHR(D3D12SerializeVersionedRootSignature(&RootSig,pSerializedRootSig));
ID3D12RootSignature* pRootSignature;
hr = CheckHR(pDevice->CreateRootSignature( pSerializedRootSig->GetBufferPointer(),pSerializedRootSig->GetBufferSize(), __uuidof(ID3D12RootSignature), &pRootSignature));

Root Signaatures 包含 root constants, root descriptors, descriptor tables 三种类型
是shader paramaters
REF:
https://docs.microsoft.com/en-us/windows/desktop/direct3d12/descriptor-tables-overview
https://docs.microsoft.com/en-us/windows/desktop/direct3d12/creating-a-root-signature
DX12的更多相关文章
- DX12龙书第6章习题
1. { { , DXGI_FORMAT_R32G32B32_FLOAT, , , D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, }, { , DXGI_FO ...
- WITCH CHAPTER 0 [cry] 绝密开发中的史克威尔艾尼克斯的DX12技术演示全貌
西川善司的[WITCH CHAPTER 0 cry]讲座 ~绝密开发中的史克威尔艾尼克斯的DX12技术演示全貌 注:日文原文地址: http://pc.watch.impress.co.jp/d ...
- 虚幻4以及DX12将允许开发者利用Xbox One的更多性能(转)
GamingBolt 最近采访了 Epic Games 的总经理 Ray Davis,讨论了有关旗下虚幻引擎(Unreal Engine)的议题.在这次的访谈中,Ray 解释了关于使用 DirectX ...
- Dx12 occlusion query
https://github.com/Microsoft/DirectX-Graphics-Samples/blob/master/Samples/Desktop/D3D12PredicationQu ...
- dx12 memory management
https://msdn.microsoft.com/en-us/library/windows/desktop/dn508285(v=vs.85).aspx Map with D3D11_MAP_W ...
- DX12龙书 00 - 环境配置:通过 Visual Studio 2019 运行示例项目
0x00 安装 Visual Studio 2019 安装 Visual Studio 2019 以及相关组件. 注:安装组件时带的 Windows 10 SDK 可以在 Individual com ...
- DX12 开debuggerlayer
https://social.technet.microsoft.com/Forums/azure/en-US/ef10f8eb-fee0-4cde-bb01-52d1db2ea347/win10-1 ...
- DX12龙书 01 - 向量在几何学和数学中的表示以及运算定义
0x00 向量 向量 ( vector ) 是一种兼具大小 ( magnitude ) 和方向的量. 0x01 几何表示 几何方法中用一条有向线段来表示一个向量,其中,线段长度代表向量的模,箭头的指向 ...
- DX12龙书 02 - DirectXMath 库中与向量有关的类和函数
0x00 需要用到的头文件 #include <DirectXMath> #include <DirectXPackedVector.h> using namespace Di ...
随机推荐
- hadoop 分布式环境安装
centos 多台机器免密登录 hadoop学习笔记(五)--全分布模式下SSH免密码登陆的实现 参考安装教程 Hadoop-2.7.4 集群快速搭建 启动hadoop cd /opt/soft/ha ...
- Binary Tree Level Order Traversal&&II
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...
- Jump Game I&&II——入门级贪心算法
Jump Game I Given an array of non-negative integers, you are initially positioned at the first index ...
- vs2005 QT4.7.1编译 详细
http://blog.csdn.net/debugconsole/article/details/8230683 网上一搜有QT+2005编译的很多文章,但是都不详细,很多都编不过,特别的在conf ...
- python——聊聊iterable,sequence和iterators
---------------------------------------------------------------前言----------------------------------- ...
- 最正确的React事件绑定方式
参考这篇文章:Choosing the Best Approach for React Event Handlers 1.function.bind()方式 2.inline arrow functi ...
- 【我要学python】爬虫准备之了解基本的html标签
HTML 标题 <h1>This is a heading</h1> HTML 段落 <p>This is a paragraph.</p> HTML ...
- Spring MVC源码——Root WebApplicationContext
目录 Spring MVC源码--Root WebApplicationContext 上下文层次结构 Root WebApplicationContext 初始化和销毁 ContextLoaderL ...
- XJTUOJ wmq的队伍(树状数组求 K 元逆序对)
题目链接:http://oj.xjtuacm.com/problem/14/[分析]二元的逆序对应该都会求,可以用树状数组.这个题要求K元,我们可以看成二元的.我们先从后往前求二元逆序对数, 然后对于 ...
- Meeting Rooms II -- LeetCode
Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si ...