Opened 7 years ago
Last modified 7 years ago
#5 accepted 작업
SPIRV 리플랙션 / triangle
| Reported by: | Hongtae Kim | Owned by: | Hongtae Kim |
|---|---|---|---|
| Priority: | 사소 | Milestone: | pipelineReflection |
| Component: | Graphics/Compute Pipeline | Version: | 2.0 |
| Keywords: | Cc: |
Description
GLSL
vertex shader
#version 450 #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_420pack : enable layout (location = 0) in vec3 inPos; layout (location = 1) in vec3 inColor; layout (binding = 0) uniform UBO { mat4 projectionMatrix; mat4 modelMatrix; mat4 viewMatrix; } ubo; layout (location = 0) out vec3 outColor; out gl_PerVertex { vec4 gl_Position; }; void main() { outColor = inColor; gl_Position = ubo.projectionMatrix * ubo.viewMatrix * ubo.modelMatrix * vec4(inPos.xyz, 1.0); }
fragment shader
#version 450 #extension GL_ARB_separate_shader_objects : enable #extension GL_ARB_shading_language_420pack : enable layout (location = 0) in vec3 inColor; layout (location = 0) out vec4 outFragColor; void main() { outFragColor = vec4(inColor, 1.0); }
Change History (7)
comment:1 Changed 7 years ago by
| Component: | 일반 → Graphics/Compute Pipeline |
|---|
comment:2 Changed 7 years ago by
comment:3 Changed 7 years ago by
Reflection Info
MTLRenderPipelineReflection data
Printing description of pipelineReflection:
<MTLRenderPipelineReflectionInternal: 0x600000080370>
Vertex Arguments:
argumentsCount = 2
Argument 0: <MTLBufferArgument: 0x600000085230>
Name = vertexBuffer.0
Type = MTLArgumentTypeBuffer
Access = MTLArgumentAccessReadOnly
LocationIndex = 6
IsActive = 1
ArrayLength = 1
TypeInfo =
DataType = MTLDataTypePointer
ElementType = MTLDataTypeStruct
Access = MTLArgumentAccessReadOnly
Alignment = 4
DataSize = 24
Alignment = 4
DataSize = 24
DataType = MTLDataTypeStruct
Argument 1: <MTLBufferArgument: 0x600000087760>
Name = ubo
Type = MTLArgumentTypeBuffer
Access = MTLArgumentAccessReadOnly
LocationIndex = 0
IsActive = 1
ArrayLength = 1
TypeInfo =
DataType = MTLDataTypePointer
ElementType = MTLDataTypeStruct
ElementTypeDescription = <MTLStructTypeInternal: 0x60400044c120>
DataType = MTLDataTypeStruct
0 <MTLStructMemberInternal: 0x604000096ad0>
Name = projectionMatrix
Offset = 0
DataType = MTLDataTypeFloat4x4
ArgumentIndex = 0
TypeInfo = nil
1 <MTLStructMemberInternal: 0x604000096bc0>
Name = modelMatrix
Offset = 64
DataType = MTLDataTypeFloat4x4
ArgumentIndex = 0
TypeInfo = nil
2 <MTLStructMemberInternal: 0x604000096c10>
Name = viewMatrix
Offset = 128
DataType = MTLDataTypeFloat4x4
ArgumentIndex = 0
TypeInfo = nil
Access = MTLArgumentAccessReadOnly
Alignment = 256
DataSize = 192
Alignment = 256
DataSize = 192
DataType = MTLDataTypeStruct
Fragment Arguments:
argumentsCount = 0
comment:4 Changed 7 years ago by
DKGL Reflection Output
[32240:34732 V] VertexFunction.VertexAttributes: 2 [32240:34732 V] --> VertexAttribute[0]: "inColor" (location:1) [32240:34732 V] --> VertexAttribute[1]: "inPos" (location:0) [32240:34732 V] PipelineReflection.VertexResources: 1 [32240:34732 I] ShaderResource: ubo (set=0, binding=0) [32240:34732 I] +Type:Buffer, Access:ReadOnly, Enabled:1 Alignment:0, Size:192 [32240:34732 I] +TypeKey: ubo (struct) [32240:34732 I] + projectionMatrix (Float4x4, Offset: 0, Size: 64) [32240:34732 I] + modelMatrix (Float4x4, Offset: 64, Size: 64) [32240:34732 I] + viewMatrix (Float4x4, Offset: 128, Size: 64) [32240:34732 V] PipelineReflection.FragmentResources: 0
comment:5 Changed 7 years ago by
| Resolution: | → 수정됨 |
|---|---|
| Status: | assigned → closed |
comment:6 Changed 7 years ago by
| Priority: | 치명적 → 중요 |
|---|---|
| Resolution: | 완료 |
| Status: | closed → reopened |
comment:7 Changed 7 years ago by
| Priority: | 중요 → 사소 |
|---|---|
| Status: | reopened → accepted |
Note: See
TracTickets for help on using
tickets.
Apple Metal
vertex shader