GteHLSLStructuredBuffer.cpp
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.1 (2016/09/12)
7 
8 #include <GTEnginePCH.h>
10 using namespace gte;
11 
12 
14 {
15 }
16 
18  D3D_SHADER_INPUT_BIND_DESC const& desc)
19  :
20  HLSLResource(desc, 0)
21 {
22  Initialize(desc);
23 }
24 
26  D3D_SHADER_INPUT_BIND_DESC const& desc, unsigned int index)
27  :
28  HLSLResource(desc, index, 0)
29 {
30  Initialize(desc);
31 }
32 
34  D3D_SHADER_INPUT_BIND_DESC const& desc)
35 {
36  if (desc.Type == D3D_SIT_STRUCTURED
37  || desc.Type == D3D_SIT_UAV_RWSTRUCTURED)
38  {
39  mType = SBT_BASIC;
40  }
41  else if (desc.Type == D3D_SIT_UAV_APPEND_STRUCTURED)
42  {
43  mType = SBT_APPEND;
44  }
45  else if (desc.Type == D3D_SIT_UAV_CONSUME_STRUCTURED)
46  {
48  }
49  else if (desc.Type == D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER)
50  {
51  mType = SBT_COUNTER;
52  }
53  else
54  {
56  }
57 
58  mGpuWritable =
59  desc.Type == D3D_SIT_UAV_RWSTRUCTURED ||
60  desc.Type == D3D_SIT_UAV_APPEND_STRUCTURED ||
61  desc.Type == D3D_SIT_UAV_CONSUME_STRUCTURED ||
62  desc.Type == D3D_SIT_UAV_RWSTRUCTURED_WITH_COUNTER;
63 }
64 
65 HLSLStructuredBuffer::Type HLSLStructuredBuffer::GetType() const
66 {
67  return mType;
68 }
69 
71 {
72  return mGpuWritable;
73 }
74 
#define D3D_SHADER_INPUT_BIND_DESC
HLSLStructuredBuffer(D3D_SHADER_INPUT_BIND_DESC const &desc)
GLuint index
Definition: glcorearb.h:781
void Initialize(D3D_SHADER_INPUT_BIND_DESC const &desc)


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00