티스토리 뷰

Metal 기본 용어
MTLDevice
- GPU 연결
- Command queue를 생성하도록 한다.
Command queue
- Command buffer를 갖고 있다.
- GPU가 실행할 Command buffer의 정렬된 리스트를 받는다.
- 생성하는데 비용이 많이 들어 명령이 끝나도 삭제되지 않고 재사용된다.
Command buffer
- 프레임을 렌더링하기 위한 instruction을 저장한다.
- buffer 작업이 완료되면 버퍼는 해제된다.
Commands
- Command Buffer로 encoded된다.
- 모든 Commands가 enqueue되면 Command buffer는 Command queue로 commit, submit된다.
MTLRenderPipelineState
- Command Encoder에 전달된다.
MTLRenderCommandEncoder
- vertex, fragment shader의 데이터 소스를 준비한다.
- Buffer의 형태로 수행될 수 있다.
Rendering 과정
- Preparing data for GPU
- Vertex Shading
- Clipping
- Primitive Asssembly
- Rasterization
- Fragment Shading
- Raster Output
'iOS > Metal' 카테고리의 다른 글
Metal: MTKView 해상도 변경하기 (0) | 2022.01.06 |
---|---|
Metal: 현재 스크린에 렌더링된 결과 가져오기 (0) | 2022.01.06 |
Issue: [CIImage initWithMTLTexture:options:] texture type must include MTLTextureUsageShaderRead. (0) | 2022.01.06 |
Metal: Metal로 카메라 렌더링하기 요약 (0) | 2022.01.06 |
Issue: CVMetalTextureCacheCreateTextureFromImage returns -6660 (0) | 2022.01.06 |