| 1974 | } |
| 1975 | |
| 1976 | void CommandListWrapper::evaluatePushConstantSize(const nvrhi::BindingLayoutVector& bindingLayouts) |
| 1977 | { |
| 1978 | m_PipelinePushConstantSize = 0; |
| 1979 | |
| 1980 | // Find the first PushConstants entry. |
| 1981 | // Assumes that the binding layout vector has been validated for duplicated push constants entries. |
| 1982 | |
| 1983 | for (const auto& layout : bindingLayouts) |
| 1984 | { |
| 1985 | const BindingLayoutDesc* layoutDesc = layout->getDesc(); |
| 1986 | |
| 1987 | if (!layoutDesc) // bindless layouts have null desc |
| 1988 | continue; |
| 1989 | |
| 1990 | for (const auto& item : layoutDesc->bindings) |
| 1991 | { |
| 1992 | if (item.type == ResourceType::PushConstants) |
| 1993 | { |
| 1994 | m_PipelinePushConstantSize = item.size; |
| 1995 | return; |
| 1996 | } |
| 1997 | } |
| 1998 | } |
| 1999 | } |
| 2000 | |
| 2001 | bool CommandListWrapper::validatePushConstants(const char* pipelineType, const char* stateFunctionName) const |
| 2002 | { |