Files
test/source/blender/gpu/vulkan/vk_pipeline_state.hh
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00

52 lines
1.5 KiB
C++

/* SPDX-FileCopyrightText: 2023 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup gpu
*/
#include "gpu_state_private.hh"
#include "vk_common.hh"
#include "BLI_vector.hh"
namespace blender::gpu {
class VKFrameBuffer;
class VKPipelineStateManager {
private:
GPUState current_;
GPUStateMutable current_mutable_;
public:
VkPipelineColorBlendStateCreateInfo pipeline_color_blend_state;
VkPipelineColorBlendAttachmentState color_blend_attachment_template;
Vector<VkPipelineColorBlendAttachmentState> color_blend_attachments;
VkPipelineRasterizationStateCreateInfo rasterization_state;
VkPipelineDepthStencilStateCreateInfo depth_stencil_state;
VKPipelineStateManager();
void set_state(const GPUState &state, const GPUStateMutable &mutable_state);
void force_state(const GPUState &state, const GPUStateMutable &mutable_state);
void finalize_color_blend_state(const VKFrameBuffer &framebuffer);
private:
void set_blend(eGPUBlend blend);
void set_write_mask(eGPUWriteMask write_mask);
void set_depth_test(eGPUDepthTest value);
void set_stencil_test(eGPUStencilTest test, eGPUStencilOp operation);
void set_stencil_mask(eGPUStencilTest test, const GPUStateMutable &mutable_state);
void set_clip_distances(int new_dist_len, int old_dist_len);
void set_logic_op(bool enable);
void set_facing(bool invert);
void set_backface_culling(eGPUFaceCullTest test);
void set_provoking_vert(eGPUProvokingVertex vert);
void set_shadow_bias(bool enable);
};
} // namespace blender::gpu