Reformat maxwell3d interconnect codebase

This commit is contained in:
Billy Laws 2022-10-09 13:57:47 +01:00
parent 3766be59e7
commit 62a165b51e
10 changed files with 153 additions and 133 deletions

View File

@ -49,7 +49,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
bool VertexBufferState::Refresh(InterconnectContext &ctx, StateUpdateBuilder &builder) {
if (megaBufferBinding) {
if (auto newMegaBufferBinding{view->TryMegaBuffer(ctx.executor.cycle, ctx.executor.AcquireMegaBufferAllocator(), ctx.executor.executionNumber)};
newMegaBufferBinding != megaBufferBinding) {
newMegaBufferBinding != megaBufferBinding) {
megaBufferBinding = newMegaBufferBinding;
if (megaBufferBinding)

View File

@ -15,7 +15,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
};
private:
dirty::BoundSubresource<EngineRegisters> engine;
dirty::BoundSubresource <EngineRegisters> engine;
public:
ConstantBufferSelectorState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine);
@ -32,7 +32,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
struct ConstantBuffer {
BufferView view;
void Read(CommandExecutor &executor, span<u8> dstBuffer, size_t srcOffset);
void Read(CommandExecutor &executor, span <u8> dstBuffer, size_t srcOffset);
template<typename T>
T Read(CommandExecutor &executor, size_t srcOffset) {
@ -49,7 +49,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
*/
class ConstantBuffers {
private:
dirty::ManualDirtyState<ConstantBufferSelectorState> selectorState;
dirty::ManualDirtyState <ConstantBufferSelectorState> selectorState;
public:
ConstantBufferSet boundConstantBuffers;
@ -68,7 +68,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void MarkAllDirty();
void Load(InterconnectContext &ctx, span<u32> data, u32 offset);
void Load(InterconnectContext &ctx, span <u32> data, u32 offset);
void Bind(InterconnectContext &ctx, engine::ShaderStage stage, size_t index);

View File

@ -152,9 +152,9 @@ namespace skyline::gpu::interconnect::maxwell3d {
static VkColorComponentFlags ConvertColorWriteMask(engine::CtWrite write) {
return (write.rEnable ? VK_COLOR_COMPONENT_R_BIT : 0) |
(write.gEnable ? VK_COLOR_COMPONENT_G_BIT : 0) |
(write.bEnable ? VK_COLOR_COMPONENT_B_BIT : 0) |
(write.aEnable ? VK_COLOR_COMPONENT_A_BIT : 0);
(write.gEnable ? VK_COLOR_COMPONENT_G_BIT : 0) |
(write.bEnable ? VK_COLOR_COMPONENT_B_BIT : 0) |
(write.aEnable ? VK_COLOR_COMPONENT_A_BIT : 0);
};
static u8 ConvertBlendOp(engine::BlendOp op) {

View File

@ -174,8 +174,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
ctx.gpu.shader.ResetPools();
using PipelineStage = engine::Pipeline::Shader::Type;
auto pipelineStage{[](size_t i){ return static_cast<PipelineStage>(i); }};
auto stageIdx{[](PipelineStage stage){ return static_cast<u8>(stage); }};
auto pipelineStage{[](size_t i) { return static_cast<PipelineStage>(i); }};
auto stageIdx{[](PipelineStage stage) { return static_cast<u8>(stage); }};
std::array<Shader::IR::Program, engine::PipelineCount> programs;
bool ignoreVertexCullBeforeFetch{};
@ -233,7 +233,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
auto &stageDescInfo{descriptorInfo.stages[i]};
auto pushBindings{[&](vk::DescriptorType type, const auto &descs, u32 &count, auto &&descCb, bool individualDescWrites = false) {
auto pushBindings{[&](vk::DescriptorType type, const auto &descs, u32 &count, auto &&descCb, bool individualDescWrites = false) {
descriptorInfo.totalWriteDescCount += individualDescWrites ? descs.size() : ((descs.size() > 0) ? 1 : 0);
for (u32 descIdx{}; descIdx < descs.size(); descIdx++) {
@ -328,7 +328,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
numericalType = engine::VertexAttribute::NumericalType::Uint;
switch (componentBitWidths | numericalType) {
/* 8-bit components */
/* 8-bit components */
FORMAT_NORM_INT_SCALED_CASE(R8, eR8);
FORMAT_NORM_INT_SCALED_CASE(R8_G8, eR8G8);
FORMAT_NORM_INT_SCALED_CASE(G8R8, eR8G8);
@ -429,21 +429,23 @@ namespace skyline::gpu::interconnect::maxwell3d {
for (u32 i{}; i < engine::VertexStreamCount; i++) {
const auto &binding{packedState.vertexBindings[i]};
bindingDescs.push_back({
.binding = i,
.stride = binding.stride,
.inputRate = binding.GetInputRate(),
});
.binding = i,
.stride = binding.stride,
.inputRate = binding.GetInputRate(),
});
if (binding.GetInputRate() == vk::VertexInputRate::eInstance) {
if (!ctx.gpu.traits.supportsVertexAttributeDivisor) [[unlikely]]
if (!ctx.gpu.traits.supportsVertexAttributeDivisor)
[[unlikely]]
Logger::Warn("Vertex attribute divisor used on guest without host support");
else if (!ctx.gpu.traits.supportsVertexAttributeZeroDivisor && binding.divisor == 0) [[unlikely]]
else if (!ctx.gpu.traits.supportsVertexAttributeZeroDivisor && binding.divisor == 0)
[[unlikely]]
Logger::Warn("Vertex attribute zero divisor used on guest without host support");
else
bindingDivisorDescs.push_back({
.binding = i,
.divisor = binding.divisor,
});
.binding = i,
.divisor = binding.divisor,
});
}
}
@ -451,11 +453,11 @@ namespace skyline::gpu::interconnect::maxwell3d {
const auto &attribute{packedState.vertexAttributes[i]};
if (attribute.source == engine::VertexAttribute::Source::Active && shaderStages[0].info.loads.Generic(i))
attributeDescs.push_back({
.location = i,
.binding = attribute.stream,
.format = ConvertVertexInputAttributeFormat(attribute.componentBitWidths, attribute.numericalType),
.offset = attribute.offset,
});
.location = i,
.binding = attribute.stream,
.format = ConvertVertexInputAttributeFormat(attribute.componentBitWidths, attribute.numericalType),
.offset = attribute.offset,
});
}
vk::StructureChain<vk::PipelineVertexInputStateCreateInfo, vk::PipelineVertexInputDivisorStateCreateInfoEXT> vertexInputState{
@ -668,7 +670,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
size_t primaryCbufOffset{desc.cbuf_offset + elemOffset};
u32 primaryVal{primaryCbuf.Read<u32>(ctx.executor, primaryCbufOffset)};
if constexpr (requires { desc.has_secondary; } ) {
if constexpr (requires { desc.has_secondary; }) {
if (desc.has_secondary) {
ConstantBuffer &secondaryCbuf{constantBuffers[desc.secondary_cbuf_index]};
size_t secondaryCbufOffset{desc.secondary_cbuf_offset + elemOffset};
@ -677,7 +679,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
}
}
return { .raw = primaryVal };
return {.raw = primaryVal};
}
static vk::DescriptorImageInfo GetTextureBinding(InterconnectContext &ctx, const Shader::TextureDescriptor &desc, Samplers &samplers, Textures &textures, BindlessHandle handle) {
@ -768,29 +770,29 @@ namespace skyline::gpu::interconnect::maxwell3d {
writeBufferDescs(vk::DescriptorType::eUniformBuffer, stage.info.constant_buffer_descriptors, stageDescInfo.uniformBufferDescCount,
[&](const Shader::ConstantBufferDescriptor &desc, size_t arrayIdx) {
size_t cbufIdx{desc.index + arrayIdx};
return GetConstantBufferBinding(ctx, stage.info, constantBuffers[i][cbufIdx].view, cbufIdx);
});
size_t cbufIdx{desc.index + arrayIdx};
return GetConstantBufferBinding(ctx, stage.info, constantBuffers[i][cbufIdx].view, cbufIdx);
});
writeBufferDescs(vk::DescriptorType::eStorageBuffer, stage.info.storage_buffers_descriptors, stageDescInfo.storageBufferDescCount,
[&](const Shader::StorageBufferDescriptor &desc, size_t arrayIdx) {
auto binding{GetStorageBufferBinding(ctx, desc, constantBuffers[i][desc.cbuf_index], storageBufferViews[storageBufferIdx - arrayIdx ? 1 : 0])};
// Storage buffer arrays all share the same view index, so to only increment the index once per array do it at element zero and subtract that for all subsequent array elems (see above)
storageBufferIdx += arrayIdx ? 0 : 1;
return binding;
});
auto binding{GetStorageBufferBinding(ctx, desc, constantBuffers[i][desc.cbuf_index], storageBufferViews[storageBufferIdx - arrayIdx ? 1 : 0])};
// Storage buffer arrays all share the same view index, so to only increment the index once per array do it at element zero and subtract that for all subsequent array elems (see above)
storageBufferIdx += arrayIdx ? 0 : 1;
return binding;
});
writeImageDescs(vk::DescriptorType::eCombinedImageSampler, stage.info.texture_descriptors, stageDescInfo.combinedImageSamplerDescCount,
[&](const Shader::TextureDescriptor &desc, size_t arrayIdx) {
BindlessHandle handle{ReadBindlessHandle(ctx, constantBuffers[i], desc, arrayIdx)};
return GetTextureBinding(ctx, desc, samplers, textures, handle);
}, ctx.gpu.traits.quirks.needsIndividualTextureBindingWrites);
BindlessHandle handle{ReadBindlessHandle(ctx, constantBuffers[i], desc, arrayIdx)};
return GetTextureBinding(ctx, desc, samplers, textures, handle);
}, ctx.gpu.traits.quirks.needsIndividualTextureBindingWrites);
}
// Since we don't implement all descriptor types the number of writes might not match what's expected
if (!writeIdx)
return nullptr;
return ctx.executor.allocator->EmplaceUntracked<DescriptorUpdateInfo>(DescriptorUpdateInfo{
.writes = writes.first(writeIdx),
.bufferDescs = bufferDescs.first(bufferIdx),
@ -855,21 +857,21 @@ namespace skyline::gpu::interconnect::maxwell3d {
}};
writeDescs.operator()<false, true>(vk::DescriptorType::eUniformBuffer, cbufUsageInfo.uniformBuffers, shaderInfo.constant_buffer_descriptors,
[&](auto usage, const Shader::ConstantBufferDescriptor &desc, size_t arrayIdx) -> DynamicBufferBinding {
size_t cbufIdx{desc.index + arrayIdx};
return GetConstantBufferBinding(ctx, shaderInfo, stageConstantBuffers[cbufIdx].view, cbufIdx);
});
[&](auto usage, const Shader::ConstantBufferDescriptor &desc, size_t arrayIdx) -> DynamicBufferBinding {
size_t cbufIdx{desc.index + arrayIdx};
return GetConstantBufferBinding(ctx, shaderInfo, stageConstantBuffers[cbufIdx].view, cbufIdx);
});
writeDescs.operator()<false, true>(vk::DescriptorType::eStorageBuffer, cbufUsageInfo.storageBuffers, shaderInfo.storage_buffers_descriptors,
[&](auto usage, const Shader::StorageBufferDescriptor &desc, size_t arrayIdx) {
return GetStorageBufferBinding(ctx, desc, stageConstantBuffers[desc.cbuf_index], storageBufferViews[usage.storageBufferIdx]);
});
[&](auto usage, const Shader::StorageBufferDescriptor &desc, size_t arrayIdx) {
return GetStorageBufferBinding(ctx, desc, stageConstantBuffers[desc.cbuf_index], storageBufferViews[usage.storageBufferIdx]);
});
writeDescs.operator()<true, false>(vk::DescriptorType::eCombinedImageSampler, cbufUsageInfo.combinedImageSamplers, shaderInfo.texture_descriptors,
[&](auto usage, const Shader::TextureDescriptor &desc, size_t arrayIdx) {
BindlessHandle handle{ReadBindlessHandle(ctx, stageConstantBuffers, desc, arrayIdx)};
return GetTextureBinding(ctx, desc, samplers, textures, handle);
});
[&](auto usage, const Shader::TextureDescriptor &desc, size_t arrayIdx) {
BindlessHandle handle{ReadBindlessHandle(ctx, stageConstantBuffers, desc, arrayIdx)};
return GetTextureBinding(ctx, desc, samplers, textures, handle);
});
// Since we don't implement all descriptor types the number of writes might not match what's expected
if (!writeIdx)

View File

@ -34,11 +34,11 @@ namespace skyline::gpu::interconnect::maxwell3d {
*/
bool BindingsEqual(const ShaderStage &other) const {
return info.constant_buffer_descriptors == other.info.constant_buffer_descriptors &&
info.storage_buffers_descriptors == other.info.storage_buffers_descriptors &&
info.texture_buffer_descriptors == other.info.texture_buffer_descriptors &&
info.image_buffer_descriptors == other.info.image_buffer_descriptors &&
info.texture_descriptors == other.info.texture_descriptors &&
info.image_descriptors == other.info.image_descriptors;
info.storage_buffers_descriptors == other.info.storage_buffers_descriptors &&
info.texture_buffer_descriptors == other.info.texture_buffer_descriptors &&
info.image_buffer_descriptors == other.info.image_buffer_descriptors &&
info.texture_descriptors == other.info.texture_descriptors &&
info.image_descriptors == other.info.image_descriptors;
}
};

View File

@ -207,5 +207,4 @@ namespace skyline::gpu::interconnect::maxwell3d {
return sampler.get();
}
}

View File

@ -39,7 +39,6 @@ namespace skyline::gpu::interconnect::maxwell3d {
tsl::robin_map<TextureSamplerControl, std::unique_ptr<vk::raii::Sampler>, util::ObjectHash<TextureSamplerControl>> texSamplerStore;
std::vector<vk::raii::Sampler *> texSamplerCache;
public:
Samplers(DirtyManager &manager, const SamplerPoolState::EngineRegisters &engine);

View File

@ -27,7 +27,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
Cmd cmd;
CmdHolder(Cmd &&cmd) : cmd{cmd} {}
CmdHolder() = default;
static void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer, StateUpdateCmdHeader *header) {
@ -55,7 +55,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
base.buffers[i] = views[i].GetBuffer()->GetBacking();
base.offsets[i] = views[i].GetOffset();
}
base.Record(gpu, commandBuffer);
}
@ -68,7 +68,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.bindIndexBuffer(buffer, offset, indexType);
}
vk::Buffer buffer;
vk::DeviceSize offset;
vk::IndexType indexType;
@ -81,7 +81,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
base.offset = view.GetOffset();
base.Record(gpu, commandBuffer);
}
SetIndexBufferCmdImpl base;
BufferView view;
};
@ -91,7 +91,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.bindTransformFeedbackBuffersEXT(binding, buffer, offset, size);
}
u32 binding;
vk::Buffer buffer;
vk::DeviceSize offset;
@ -105,7 +105,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
base.offset = view.GetOffset();
base.Record(gpu, commandBuffer);
}
SetTransformFeedbackBufferCmdImpl base;
BufferView view;
};
@ -115,7 +115,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.setViewport(index, viewport);
}
u32 index;
vk::Viewport viewport;
};
@ -125,17 +125,17 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.setScissor(index, scissor);
}
u32 index;
vk::Rect2D scissor;
};
using SetScissorCmd = CmdHolder<SetScissorCmdImpl>;
struct SetLineWidthCmdImpl {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.setLineWidth(lineWidth);
}
float lineWidth;
};
using SetLineWidthCmd = CmdHolder<SetLineWidthCmdImpl>;
@ -144,7 +144,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.setDepthBias(depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor);
}
float depthBiasConstantFactor;
float depthBiasClamp;
float depthBiasSlopeFactor;
@ -155,7 +155,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.setBlendConstants(blendConstants.data());
}
std::array<float, 4> blendConstants;
};
using SetBlendConstantsCmd = CmdHolder<SetBlendConstantsCmdImpl>;
@ -164,7 +164,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
commandBuffer.setDepthBounds(minDepthBounds, maxDepthBounds);
}
float minDepthBounds;
float maxDepthBounds;
};
@ -176,7 +176,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
commandBuffer.setStencilReference(flags, funcRef);
commandBuffer.setStencilWriteMask(flags, mask);
}
vk::StencilFaceFlags flags;
u32 funcRef;
u32 funcMask;
@ -184,7 +184,8 @@ namespace skyline::gpu::interconnect::maxwell3d {
};
using SetBaseStencilStateCmd = CmdHolder<SetBaseStencilStateCmdImpl>;
struct SetDescriptorSetWithUpdateCmdImpl {
template<bool PushDescriptor>
struct SetDescriptorSetCmdImpl {
void Record(GPU &gpu, vk::raii::CommandBuffer &commandBuffer) {
// Resolve descriptor infos from dynamic bindings
for (size_t i{}; i < updateInfo->bufferDescDynamicBindings.size(); i++) {
@ -245,7 +246,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
class StateUpdater {
private:
StateUpdateCmdHeader *first;
public:
StateUpdater(StateUpdateCmdHeader *first) : first{first} {}
@ -268,7 +269,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
SetVertexBuffersDynamicCmd *vertexBatchBind{};
StateUpdateCmdHeader *head{};
StateUpdateCmdHeader *tail{};
void AppendCmd(StateUpdateCmdHeader *cmd) {
if (tail) {
tail->next = cmd;
@ -278,7 +279,7 @@ namespace skyline::gpu::interconnect::maxwell3d {
tail = head;
}
}
template<typename Cmd>
void AppendCmd(typename Cmd::CmdType &&contents) {
Cmd *cmd{allocator.template EmplaceUntracked<Cmd>(std::forward<typename Cmd::CmdType>(contents))};
@ -332,101 +333,121 @@ namespace skyline::gpu::interconnect::maxwell3d {
}
void SetIndexBuffer(const BufferBinding &binding, vk::IndexType indexType) {
AppendCmd<SetIndexBufferCmd>({
.indexType = indexType,
.buffer = binding.buffer,
.offset = binding.offset,
});
AppendCmd<SetIndexBufferCmd>(
{
.indexType = indexType,
.buffer = binding.buffer,
.offset = binding.offset,
});
}
void SetIndexBuffer(BufferView view, vk::IndexType indexType) {
view.GetBuffer()->BlockSequencedCpuBackingWrites();
AppendCmd<SetIndexBufferDynamicCmd>({
.base.indexType = indexType,
.view = view,
});
AppendCmd<SetIndexBufferDynamicCmd>(
{
.base.indexType = indexType,
.view = view,
});
}
void SetTransformFeedbackBuffer(u32 index, const BufferBinding &binding) {
AppendCmd<SetTransformFeedbackBufferCmd>({
.binding = index,
.buffer = binding.buffer,
.offset = binding.offset,
});
AppendCmd<SetTransformFeedbackBufferCmd>(
{
.binding = index,
.buffer = binding.buffer,
.offset = binding.offset,
});
}
void SetTransformFeedbackBuffer(u32 index, BufferView view) {
view.GetBuffer()->BlockSequencedCpuBackingWrites();
AppendCmd<SetTransformFeedbackBufferDynamicCmd>({
.base.binding = index,
.view = view,
});
AppendCmd<SetTransformFeedbackBufferDynamicCmd>(
{
.base.binding = index,
.view = view,
});
}
void SetViewport(u32 index, const vk::Viewport &viewport) {
AppendCmd<SetViewportCmd>({
.index = index,
.viewport = viewport,
});
AppendCmd<SetViewportCmd>(
{
.index = index,
.viewport = viewport,
});
}
void SetScissor(u32 index, const vk::Rect2D &scissor) {
AppendCmd<SetScissorCmd>({
.index = index,
.scissor = scissor,
});
AppendCmd<SetScissorCmd>(
{
.index = index,
.scissor = scissor,
});
}
void SetLineWidth(float lineWidth) {
AppendCmd<SetLineWidthCmd>({
.lineWidth = lineWidth,
});
AppendCmd<SetLineWidthCmd>(
{
.lineWidth = lineWidth,
});
}
void SetDepthBias(float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) {
AppendCmd<SetDepthBiasCmd>({
.depthBiasConstantFactor = depthBiasConstantFactor,
.depthBiasClamp = depthBiasClamp,
.depthBiasSlopeFactor = depthBiasSlopeFactor,
});
AppendCmd<SetDepthBiasCmd>(
{
.depthBiasConstantFactor = depthBiasConstantFactor,
.depthBiasClamp = depthBiasClamp,
.depthBiasSlopeFactor = depthBiasSlopeFactor,
});
}
void SetBlendConstants(const std::array<float, engine::BlendColorChannelCount> &blendConstants) {
AppendCmd<SetBlendConstantsCmd>({
.blendConstants = blendConstants,
});
AppendCmd<SetBlendConstantsCmd>(
{
.blendConstants = blendConstants,
});
}
void SetDepthBounds(float minDepthBounds, float maxDepthBounds) {
AppendCmd<SetDepthBoundsCmd>({
.minDepthBounds = minDepthBounds,
.maxDepthBounds = maxDepthBounds,
});
AppendCmd<SetDepthBoundsCmd>(
{
.minDepthBounds = minDepthBounds,
.maxDepthBounds = maxDepthBounds,
});
}
void SetBaseStencilState(vk::StencilFaceFlags flags, u32 funcRef, u32 funcMask, u32 mask) {
AppendCmd<SetBaseStencilStateCmd>({
.flags = flags,
.funcRef = funcRef,
.funcMask = funcMask,
.mask = mask,
});
AppendCmd<SetBaseStencilStateCmd>(
{
.flags = flags,
.funcRef = funcRef,
.funcMask = funcMask,
.mask = mask,
});
}
void SetDescriptorSetWithUpdate(DescriptorUpdateInfo *updateInfo, DescriptorAllocator::ActiveDescriptorSet *dstSet, DescriptorAllocator::ActiveDescriptorSet *srcSet) {
AppendCmd<SetDescriptorSetWithUpdateCmd>({
.updateInfo = updateInfo,
.srcSet = srcSet,
.dstSet = dstSet,
});
AppendCmd<SetDescriptorSetWithUpdateCmd>(
{
.updateInfo = updateInfo,
.srcSet = srcSet,
.dstSet = dstSet,
});
}
void SetPipeline(vk::Pipeline pipeline) {
AppendCmd<SetPipelineCmd>({
.pipeline = pipeline,
});
AppendCmd<SetPipelineCmd>(
{
.pipeline = pipeline,
});
}
void SetDescriptorSetWithPush(DescriptorUpdateInfo *updateInfo) {
AppendCmd<SetDescriptorSetWithPushCmd>(
{
.updateInfo = updateInfo,
});
}
};
}

View File

@ -200,7 +200,6 @@ namespace skyline::gpu::interconnect {
e16to1 = 7,
};
// 0x00
struct FormatWord {
static constexpr u32 FormatColorComponentPadMask{(1U << 31) | 0b111'111'111'111'1111111U}; //!< Mask for the format, component and pad fields

View File

@ -112,7 +112,7 @@ namespace skyline::gpu::interconnect {
};
public:
bool operator==(const TextureSamplerControl&) const = default;
bool operator==(const TextureSamplerControl &) const = default;
float MaxAnisotropy() {
constexpr size_t AnisotropyCount{8}; //!< The amount of unique anisotropy values that can be represented (2^3 — 3-bit value)