Notice
Recent Posts
Recent Comments
Link
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

Visual Studio

[Vulkan] Push constants 본문

Graphics

[Vulkan] Push constants

emacser 2024. 10. 1. 03:58

소량의 데이터를 빠르게 전달할 때 사용한다. 변환 행렬 등을 쉐이더로 넘길 때도 사용할 수 있다.

모든 쉐이더 단계에 데이터를 전송할 수 있다.

Command Buffer 자체에 저장되기 때문에 Command Buffer를 다시 만들지 않는 한 변경할 수 없다.

vkCmdPushConstants() 함수를 사용하여 데이터를 Command Buffer에 입력한다.

쉐이더에서는 다음과 같이 사용한다.

layout( push_constant ) uniform constants
{
	vec4 data;
	mat4 render_matrix;
} PushConstants;

'Graphics' 카테고리의 다른 글

Early depth testing, Early z pass  (0) 2024.09.17
[Vulkan] Primary Command Buffer vs Secondary Command Buffer  (0) 2024.09.17
DirectX 11 Pipeline Stage  (0) 2022.06.07
Tessellation  (0) 2022.06.06
DirectX 디버깅 도구 : Microsoft PIX (2)  (0) 2022.06.06