13 #ifndef RV_VKPipeline_h
14 #define RV_VKPipeline_h
61 {(uint32_t)rect.
width(),
100 UT_ASSERT(
false &&
"Unrecognized Topology Type used for Pipeline");
181 myRenderPassInfo = info;
205 bool myIsVertexInputDynamic =
false;
212 bool myIsTopologyDynamic =
false;
215 bool myIsPrimRestartDynamic =
false;
216 bool myPrimitiveRestartEnable =
false;
219 bool myHasTesselation =
false;
220 bool myIsControlPointsDynamic =
false;
221 uint32_t myTessControlPoints = 4;
228 bool myIsViewportDynamic =
false;
232 bool myIsScissorDynamic =
false;
240 bool myDepthClamp =
false;
243 bool myIsRasterDiscardDynamic =
false;
244 bool myRasterDiscard =
false;
246 bool myIsCullModeDynamic =
false;
249 bool myIsFrontFaceDynamic=
false;
252 bool myIsBiasDynamic =
false;
253 bool myDepthBiasEnable =
false;
255 bool myIsBiasParamDynamic=
false;
256 float myBiasConst = 0.f;
257 float myBiasClamp = 0.f;
258 float myBiasSlope = 0.f;
260 bool myIslineWidthDynamic =
false;
261 float myLineWidth = 1.f;
264 int mySampleCount = -1;
272 bool myIsDepthTestDynamic =
false;
273 bool myDepthTest =
true;
275 bool myIsDepthWriteDynamic =
false;
276 bool myDepthWrite =
true;
278 bool myIsDepthOpDynamic =
false;
281 bool myIsDepthBoundsEnableDynamic =
false;
282 bool myDepthBoundsTest =
false;
284 bool myIsDepthBoundsDynamic =
false;
285 float myMinDepth = 0.f;
286 float myMaxDepth = 1.f;
288 bool myIsStencilTestDynamic =
false;
289 bool myStencilTest =
false;
291 bool myIsStencilOpDynamic =
false;
292 bool myIsStencilWriteMaskDynamic =
false;
293 bool myIsStencilCompMaskDynamic =
false;
294 bool myIsStencilRefDynamic =
false;
321 bool myLogicOpEnable =
false;
338 bool myIsBlendConstDynamic =
false;
339 float myBlendConst[4] = {0.f, 0.f, 0.f, 0.f};
392 { binding,
stride, input_rate};
402 used_bindings.insert(attr.binding);
406 for (uint32_t binding : used_bindings)
456 : myInst(inst), myVkPipeline(vk_pipeline)
465 : myInst(other.myInst), myVkPipeline(other.myVkPipeline)
467 other.myInst =
nullptr;
495 const char* filenames,
RV_VKPipeline & operator=(RV_VKPipeline &)=delete
VKAPI_ATTR void VKAPI_CALL vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks *pAllocator)
RV_VKPipeline(RV_VKPipeline &&other) noexcept
void setCapacity(exint new_capacity)
std::pair< float, float > RV_DepthRange
void setSize(exint newsize)
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
void setRenderRegion(const UT_DimRect ®ion)
RAII wrapper class for VkPipeline.
GLint GLint GLsizei GLint GLenum format
static RV_VKPipeline * create(RV_Instance *inst, const RV_VKPipelineLayout &layout_info, const RV_VKPipelineStateInfo &state_info, const RV_VKPipelineInputInfo &input_info)
GLint GLenum GLboolean GLsizei stride
void setRenderPassInfo(const RV_RenderPassFormatInfo &info)
int x() const
Get lower-left corner.
exint removeIf(IsEqual is_equal)
Handle to the main interface of Vulkan.
int width() const
Get width/height dimensions.
VkPipeline getVkPipeline()
RV_RenderPassFormatInfo myRenderPassInfo
RV_VKPipeline(RV_Instance *inst, VkPipeline vk_pipeline)
RV_TopologyClass RVgetTopologyClass(VkPrimitiveTopology t)
VkRect2D RVmakeVkRect(const UT_DimRect &rect)
int y() const
Get lower-left corner.
VkDevice getDevice()
Get the raw vulkan device assocated with this instance.
static RV_VKPipeline * createCompute(RV_Instance *inst, const RV_VKPipelineLayout &layout)
int height() const
Get width/height dimensions.
bool RVisSameTopologyClass(VkPrimitiveTopology lhs, VkPrimitiveTopology rhs)
RV_API void RVloadSpirvFiles(RV_Instance *inst, const UT_StringArray &filenames, UT_Array< UT_UniquePtr< RV_VKShaderModule >> &shader_modules)
void clear()
Resets list to an empty list.
VkViewport RVmakeViewport(const UT_DimRect &view_rect, RV_DepthRange depth_range={0.f, 1.f})