Blender V5.3
gpu_shader_create_info_pipeline.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "GPU_primitive.hh"
12
13#include "gpu_state_private.hh"
15
16namespace blender::gpu::shader {
17
23 /* Vertex input */
25 /* Pre-fragment and Fragment stage. */
28 /* Attachment formats. */
32
34
35 Self &state(GPUWriteMask write_mask,
36 GPUBlend blend,
37 GPUFaceCullTest culling_test,
38 GPUDepthTest depth_test,
39 GPUStencilTest stencil_test,
40 GPUStencilOp stencil_op,
41 GPUProvokingVertex provoking_vert)
42 {
43 state_.write_mask = write_mask;
44 state_.blend = blend;
45 state_.culling_test = culling_test;
46 state_.depth_test = depth_test;
47 state_.stencil_test = stencil_test;
48 state_.stencil_op = stencil_op;
49 state_.provoking_vert = provoking_vert;
50 return *this;
51 }
52
53 Self &primitive(GPUPrimType primitive_type)
54 {
55 primitive_ = primitive_type;
56 return *this;
57 }
58
59 Self &viewports(uint32_t viewport_count)
60 {
61 viewport_count_ = viewport_count;
62 return *this;
63 }
64
70
77
84
92};
93
94} // namespace blender::gpu::shader
#define specialization_constant(default_value)
GPUTextureFormatFlag to_format_flag(TextureFormat format)
constexpr TextureFormat to_texture_format(TextureTargetFormat format)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
unsigned int uint32_t
Definition BKE_text.h:81
@ GPU_WRITE_COLOR
Definition GPU_state.hh:27
GPUProvokingVertex
Definition GPU_state.hh:162
Description of a graphical pipeline to pre-compile during shader creation.
Self & add_specialization_constant(SpecializationConstant::Value specialization_constant)
Vector< SpecializationConstant::Value > specialization_constants_
Self & stencil_format(TextureTargetFormat stencil_format)
Self & depth_format(TextureTargetFormat depth_format)
Self & color_format(TextureTargetFormat color_format)
Self & state(GPUWriteMask write_mask, GPUBlend blend, GPUFaceCullTest culling_test, GPUDepthTest depth_test, GPUStencilTest stencil_test, GPUStencilOp stencil_op, GPUProvokingVertex provoking_vert)