зеркало из https://github.com/AvaloniaUI/angle.git
Vulkan: 8bit index support for DrawElementsIndirect
Add partial support for DrawElementsIndirect. This supports all primitives types except lineloop. Includes a compute shader for converting 8bit index buffers to 16bit index buffers where the index buffer range is defined in a GPU buffer. Test: dEQP.GLES31/functional_draw_indirect_* Bug: angleproject:3564 Change-Id: Ibe9c55323e46a398f0b703cd8597a72ba6790570 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1792948 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
7c8e276ca0
Коммит
3c2a52309a
|
@ -82,9 +82,13 @@
|
|||
"src/libANGLE/renderer/vulkan/shaders/gen/BufferUtils.comp.0000000B.inc":
|
||||
"7e13d5325d35f96045e920a1cb3598bc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000000.inc":
|
||||
"dbd9529dd0c4ba0947842a9eb18e6189",
|
||||
"b3877393750a16efd1d6805a0327a9e7",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000001.inc":
|
||||
"2e8b92c66a347f3517ae1945d3ad625c",
|
||||
"66d7868159587d000ef41d84489780bc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000002.inc":
|
||||
"db98380613bc3f032037b4a096756975",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000003.inc":
|
||||
"e676bdff5c3b596eccba13a4e52d3875",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000000.inc":
|
||||
"f5ef892346ee10e5d0d9f8cba2a491b2",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000001.inc":
|
||||
|
@ -282,7 +286,7 @@
|
|||
"src/libANGLE/renderer/vulkan/shaders/src/BufferUtils.comp":
|
||||
"b7c20e019199f8328ef37b11c6fbcadd",
|
||||
"src/libANGLE/renderer/vulkan/shaders/src/ConvertIndex.comp":
|
||||
"ca35df77d258baa0636529d1f0f446a9",
|
||||
"083e2b6ed2cf40f036287413c449e675",
|
||||
"src/libANGLE/renderer/vulkan/shaders/src/ConvertVertex.comp":
|
||||
"88d434e43a01906e6a6b1dd5d5e45cdc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/src/FullScreenQuad.vert":
|
||||
|
@ -296,9 +300,9 @@
|
|||
"src/libANGLE/renderer/vulkan/shaders/src/OverlayDraw.comp":
|
||||
"dcc246b398b2e07a869a264666499362",
|
||||
"src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.cpp":
|
||||
"c38ca374f8af3ce9a394b7170747cb27",
|
||||
"24c8e4c95087419916f879a8c7976213",
|
||||
"src/libANGLE/renderer/vulkan/vk_internal_shaders_autogen.h":
|
||||
"c1fdbaf6ed5605cd453eb94276e9c990",
|
||||
"2ee06bb4c179bcdcd4863396c43776a9",
|
||||
"tools/glslang/glslang_validator.exe.sha1":
|
||||
"289f30598865a987a21b79ae525fc66f",
|
||||
"tools/glslang/glslang_validator.sha1":
|
||||
|
|
|
@ -605,6 +605,24 @@ angle::Result ContextVk::setupIndirectDraw(const gl::Context *context,
|
|||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result ContextVk::setupIndexedIndirectDraw(const gl::Context *context,
|
||||
gl::PrimitiveMode mode,
|
||||
gl::DrawElementsType indexType,
|
||||
vk::CommandBuffer **commandBufferOut,
|
||||
vk::Buffer **indirectBufferOut)
|
||||
{
|
||||
ASSERT(mode != gl::PrimitiveMode::LineLoop);
|
||||
|
||||
if (indexType != mCurrentDrawElementsType)
|
||||
{
|
||||
mCurrentDrawElementsType = indexType;
|
||||
setIndexBufferDirty();
|
||||
}
|
||||
|
||||
return setupIndirectDraw(context, mode, mIndexedDirtyBitsMask, commandBufferOut,
|
||||
indirectBufferOut);
|
||||
}
|
||||
|
||||
angle::Result ContextVk::setupLineLoopDraw(const gl::Context *context,
|
||||
gl::PrimitiveMode mode,
|
||||
GLint firstVertex,
|
||||
|
@ -1523,8 +1541,34 @@ angle::Result ContextVk::drawElementsIndirect(const gl::Context *context,
|
|||
gl::DrawElementsType type,
|
||||
const void *indirect)
|
||||
{
|
||||
ANGLE_VK_UNREACHABLE(this);
|
||||
return angle::Result::Stop;
|
||||
gl::Buffer *indirectBuffer = mState.getTargetBuffer(gl::BufferBinding::DrawIndirect);
|
||||
ASSERT(indirectBuffer);
|
||||
|
||||
const gl::Buffer *indexBuffer = mVertexArray->getState().getElementArrayBuffer();
|
||||
ASSERT(indexBuffer);
|
||||
|
||||
if (type == gl::DrawElementsType::UnsignedByte && mGraphicsDirtyBits[DIRTY_BIT_INDEX_BUFFER])
|
||||
{
|
||||
BufferVk *indexVk = vk::GetImpl(indexBuffer);
|
||||
BufferVk *cmdBufferVk = vk::GetImpl(indirectBuffer);
|
||||
ANGLE_TRY(
|
||||
mVertexArray->convertIndexBufferIndirectGPU(this, cmdBufferVk, indexVk, indirect));
|
||||
}
|
||||
|
||||
vk::CommandBuffer *commandBuffer = nullptr;
|
||||
vk::Buffer *buffer = nullptr;
|
||||
|
||||
ANGLE_TRY(setupIndexedIndirectDraw(context, mode, type, &commandBuffer, &buffer));
|
||||
|
||||
if (mode == gl::PrimitiveMode::LineLoop)
|
||||
{
|
||||
// TODO - http://anglebug.com/3564
|
||||
ANGLE_VK_UNREACHABLE(this);
|
||||
return angle::Result::Stop;
|
||||
}
|
||||
|
||||
commandBuffer->drawIndexedIndirect(*buffer, reinterpret_cast<VkDeviceSize>(indirect), 1, 0);
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
gl::GraphicsResetStatus ContextVk::getResetStatus()
|
||||
|
|
|
@ -388,6 +388,11 @@ class ContextVk : public ContextImpl, public vk::Context, public vk::RenderPassO
|
|||
DirtyBits dirtyBitMask,
|
||||
vk::CommandBuffer **commandBufferOut,
|
||||
vk::Buffer **indirectBufferOut);
|
||||
angle::Result setupIndexedIndirectDraw(const gl::Context *context,
|
||||
gl::PrimitiveMode mode,
|
||||
gl::DrawElementsType indexType,
|
||||
vk::CommandBuffer **commandBufferOut,
|
||||
vk::Buffer **indirectBufferOut);
|
||||
|
||||
angle::Result setupLineLoopDraw(const gl::Context *context,
|
||||
gl::PrimitiveMode mode,
|
||||
|
|
|
@ -220,6 +220,13 @@ void SecondaryCommandBuffer::executeCommands(VkCommandBuffer cmdBuffer)
|
|||
vkCmdDrawIndirect(cmdBuffer, params->buffer, params->offset, 1, 0);
|
||||
break;
|
||||
}
|
||||
case CommandID::DrawIndexedIndirect:
|
||||
{
|
||||
const DrawIndexedIndirectParams *params =
|
||||
getParamPtr<DrawIndexedIndirectParams>(currentCommand);
|
||||
vkCmdDrawIndexedIndirect(cmdBuffer, params->buffer, params->offset, 1, 0);
|
||||
break;
|
||||
}
|
||||
case CommandID::EndQuery:
|
||||
{
|
||||
const EndQueryParams *params = getParamPtr<EndQueryParams>(currentCommand);
|
||||
|
@ -443,6 +450,9 @@ std::string SecondaryCommandBuffer::dumpCommands(const char *separator) const
|
|||
case CommandID::DrawInstanced:
|
||||
result += "DrawInstanced";
|
||||
break;
|
||||
case CommandID::DrawIndexedIndirect:
|
||||
result += "DrawIndexedIndirect";
|
||||
break;
|
||||
case CommandID::EndQuery:
|
||||
result += "EndQuery";
|
||||
break;
|
||||
|
|
|
@ -52,6 +52,7 @@ enum class CommandID : uint16_t
|
|||
DrawInstanced,
|
||||
DrawInstancedBaseInstance,
|
||||
DrawIndirect,
|
||||
DrawIndexedIndirect,
|
||||
EndQuery,
|
||||
ExecutionBarrier,
|
||||
FillBuffer,
|
||||
|
@ -231,6 +232,13 @@ struct DrawIndexedInstancedBaseVertexBaseInstanceParams
|
|||
};
|
||||
VERIFY_4_BYTE_ALIGNMENT(DrawIndexedInstancedBaseVertexBaseInstanceParams)
|
||||
|
||||
struct DrawIndexedIndirectParams
|
||||
{
|
||||
VkBuffer buffer;
|
||||
VkDeviceSize offset;
|
||||
};
|
||||
VERIFY_4_BYTE_ALIGNMENT(DrawIndexedIndirectParams)
|
||||
|
||||
struct DispatchParams
|
||||
{
|
||||
uint32_t groupCountX;
|
||||
|
@ -488,6 +496,11 @@ class SecondaryCommandBuffer final : angle::NonCopyable
|
|||
VkDeviceSize offset,
|
||||
uint32_t drawCount,
|
||||
uint32_t stride);
|
||||
void drawIndexedIndirect(const Buffer &buffer,
|
||||
VkDeviceSize offset,
|
||||
uint32_t drawCount,
|
||||
uint32_t stride);
|
||||
|
||||
void endQuery(VkQueryPool queryPool, uint32_t query);
|
||||
|
||||
void executionBarrier(VkPipelineStageFlags stageMask);
|
||||
|
@ -969,6 +982,18 @@ ANGLE_INLINE void SecondaryCommandBuffer::drawIndirect(const Buffer &buffer,
|
|||
ASSERT(drawCount == 1);
|
||||
}
|
||||
|
||||
ANGLE_INLINE void SecondaryCommandBuffer::drawIndexedIndirect(const Buffer &buffer,
|
||||
VkDeviceSize offset,
|
||||
uint32_t drawCount,
|
||||
uint32_t stride)
|
||||
{
|
||||
DrawIndexedIndirectParams *paramStruct =
|
||||
initCommand<DrawIndexedIndirectParams>(CommandID::DrawIndexedIndirect);
|
||||
paramStruct->buffer = buffer.getHandle();
|
||||
paramStruct->offset = offset;
|
||||
ASSERT(drawCount == 1);
|
||||
}
|
||||
|
||||
ANGLE_INLINE void SecondaryCommandBuffer::endQuery(VkQueryPool queryPool, uint32_t query)
|
||||
{
|
||||
EndQueryParams *paramStruct = initCommand<EndQueryParams>(CommandID::EndQuery);
|
||||
|
|
|
@ -99,9 +99,9 @@ uint32_t GetConvertVertexFlags(const UtilsVk::ConvertVertexParameters ¶ms)
|
|||
|
||||
// Assert on the types to make sure the shader supports its. These are based on
|
||||
// ConvertVertex_comp::Conversion values.
|
||||
ASSERT(!destIsSint || srcIsSint); // If destination is sint, src must be sint too
|
||||
ASSERT(!destIsUint || srcIsUint); // If destination is uint, src must be uint too
|
||||
ASSERT(!srcIsFixed || destIsFloat); // If source is fixed, dest must be float
|
||||
ASSERT(!destIsSint || srcIsSint); // If destination is sint, src must be sint too
|
||||
ASSERT(!destIsUint || srcIsUint); // If destination is uint, src must be uint too
|
||||
ASSERT(!srcIsFixed || destIsFloat); // If source is fixed, dest must be float
|
||||
ASSERT(srcIsHalfFloat == destIsHalfFloat); // Both src and dest are half float or neither
|
||||
|
||||
// One of each bool set must be true
|
||||
|
@ -508,6 +508,24 @@ angle::Result UtilsVk::ensureConvertIndexResourcesInitialized(ContextVk *context
|
|||
ArraySize(setSizes), sizeof(ConvertIndexShaderParams));
|
||||
}
|
||||
|
||||
angle::Result UtilsVk::ensureConvertIndexIndirectResourcesInitialized(ContextVk *contextVk)
|
||||
{
|
||||
if (mPipelineLayouts[Function::ConvertIndexIndirectBuffer].valid())
|
||||
{
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
VkDescriptorPoolSize setSizes[3] = {
|
||||
{VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1}, // source index buffer
|
||||
{VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1}, // dest index buffer
|
||||
{VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1}, // cmd buffer
|
||||
};
|
||||
|
||||
return ensureResourcesInitialized(contextVk, Function::ConvertIndexIndirectBuffer, setSizes,
|
||||
ArraySize(setSizes),
|
||||
sizeof(ConvertIndexIndirectShaderParams));
|
||||
}
|
||||
|
||||
angle::Result UtilsVk::ensureConvertVertexResourcesInitialized(ContextVk *contextVk)
|
||||
{
|
||||
if (mPipelineLayouts[Function::ConvertVertexBuffer].valid())
|
||||
|
@ -839,6 +857,71 @@ angle::Result UtilsVk::convertIndexBuffer(ContextVk *contextVk,
|
|||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result UtilsVk::convertIndexIndirectBuffer(ContextVk *contextVk,
|
||||
vk::BufferHelper *cmdBuffer,
|
||||
vk::BufferHelper *dest,
|
||||
vk::BufferHelper *src,
|
||||
const ConvertIndexIndirectParameters ¶ms)
|
||||
{
|
||||
ANGLE_TRY(ensureConvertIndexIndirectResourcesInitialized(contextVk));
|
||||
|
||||
vk::CommandBuffer *commandBuffer;
|
||||
ANGLE_TRY(dest->recordCommands(contextVk, &commandBuffer));
|
||||
|
||||
// Tell src we are going to read from it and dest it's being written to.
|
||||
src->onReadByBuffer(contextVk, dest, VK_ACCESS_SHADER_READ_BIT, VK_ACCESS_SHADER_WRITE_BIT);
|
||||
cmdBuffer->onReadByBuffer(contextVk, dest, VK_ACCESS_SHADER_READ_BIT,
|
||||
VK_ACCESS_SHADER_WRITE_BIT);
|
||||
|
||||
VkDescriptorSet descriptorSet;
|
||||
vk::RefCountedDescriptorPoolBinding descriptorPoolBinding;
|
||||
ANGLE_TRY(allocateDescriptorSet(contextVk, Function::ConvertIndexIndirectBuffer,
|
||||
&descriptorPoolBinding, &descriptorSet));
|
||||
|
||||
std::array<VkDescriptorBufferInfo, 3> buffers = {{
|
||||
{dest->getBuffer().getHandle(), 0, VK_WHOLE_SIZE},
|
||||
{src->getBuffer().getHandle(), 0, VK_WHOLE_SIZE},
|
||||
{cmdBuffer->getBuffer().getHandle(), 0, VK_WHOLE_SIZE},
|
||||
}};
|
||||
|
||||
VkWriteDescriptorSet writeInfo = {};
|
||||
writeInfo.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
|
||||
writeInfo.dstSet = descriptorSet;
|
||||
writeInfo.dstBinding = kConvertIndexDestinationBinding;
|
||||
writeInfo.descriptorCount = 3;
|
||||
writeInfo.descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
|
||||
writeInfo.pBufferInfo = buffers.data();
|
||||
|
||||
vkUpdateDescriptorSets(contextVk->getDevice(), 1, &writeInfo, 0, nullptr);
|
||||
|
||||
ConvertIndexIndirectShaderParams shaderParams = {params.indirectBufferOffset >> 2,
|
||||
params.dstOffset >> 2, params.maxIndex, 0};
|
||||
|
||||
uint32_t flags = vk::InternalShader::ConvertIndex_comp::kIsIndirect;
|
||||
if (contextVk->getState().isPrimitiveRestartEnabled())
|
||||
{
|
||||
flags |= vk::InternalShader::ConvertIndex_comp::kIsPrimitiveRestartEnabled;
|
||||
}
|
||||
|
||||
vk::RefCounted<vk::ShaderAndSerial> *shader = nullptr;
|
||||
ANGLE_TRY(contextVk->getShaderLibrary().getConvertIndex_comp(contextVk, flags, &shader));
|
||||
|
||||
ANGLE_TRY(setupProgram(contextVk, Function::ConvertIndexIndirectBuffer, shader, nullptr,
|
||||
&mConvertIndexPrograms[flags], nullptr, descriptorSet, &shaderParams,
|
||||
sizeof(ConvertIndexIndirectShaderParams), commandBuffer));
|
||||
|
||||
constexpr uint32_t kInvocationsPerGroup = 64;
|
||||
constexpr uint32_t kInvocationsPerIndex = 2;
|
||||
const uint32_t kIndexCount = params.maxIndex;
|
||||
const uint32_t kGroupCount =
|
||||
UnsignedCeilDivide(kIndexCount * kInvocationsPerIndex, kInvocationsPerGroup);
|
||||
commandBuffer->dispatch(kGroupCount, 1, 1);
|
||||
|
||||
descriptorPoolBinding.reset();
|
||||
|
||||
return angle::Result::Continue;
|
||||
}
|
||||
|
||||
angle::Result UtilsVk::convertVertexBuffer(ContextVk *contextVk,
|
||||
vk::BufferHelper *dest,
|
||||
vk::BufferHelper *src,
|
||||
|
|
|
@ -54,6 +54,13 @@ class UtilsVk : angle::NonCopyable
|
|||
uint32_t maxIndex = 0;
|
||||
};
|
||||
|
||||
struct ConvertIndexIndirectParameters
|
||||
{
|
||||
uint32_t indirectBufferOffset = 0;
|
||||
uint32_t dstOffset = 0;
|
||||
uint32_t maxIndex = 0;
|
||||
};
|
||||
|
||||
struct ConvertVertexParameters
|
||||
{
|
||||
size_t vertexCount;
|
||||
|
@ -137,6 +144,12 @@ class UtilsVk : angle::NonCopyable
|
|||
vk::BufferHelper *dest,
|
||||
vk::BufferHelper *src,
|
||||
const ConvertIndexParameters ¶ms);
|
||||
angle::Result convertIndexIndirectBuffer(ContextVk *contextVk,
|
||||
vk::BufferHelper *cmdBufferVk,
|
||||
vk::BufferHelper *dest,
|
||||
vk::BufferHelper *src,
|
||||
const ConvertIndexIndirectParameters ¶ms);
|
||||
|
||||
angle::Result convertVertexBuffer(ContextVk *contextVk,
|
||||
vk::BufferHelper *dest,
|
||||
vk::BufferHelper *src,
|
||||
|
@ -210,6 +223,14 @@ class UtilsVk : angle::NonCopyable
|
|||
uint32_t _padding = 0;
|
||||
};
|
||||
|
||||
struct ConvertIndexIndirectShaderParams
|
||||
{
|
||||
uint32_t cmdOffsetDiv4 = 0;
|
||||
uint32_t dstOffsetDiv4 = 0;
|
||||
uint32_t maxIndex = 0;
|
||||
uint32_t _padding = 0;
|
||||
};
|
||||
|
||||
struct ConvertVertexShaderParams
|
||||
{
|
||||
ConvertVertexShaderParams();
|
||||
|
@ -310,9 +331,10 @@ class UtilsVk : angle::NonCopyable
|
|||
BlitResolveStencilNoExport = 6,
|
||||
OverlayCull = 7,
|
||||
OverlayDraw = 8,
|
||||
ConvertIndexIndirectBuffer = 9,
|
||||
|
||||
InvalidEnum = 9,
|
||||
EnumCount = 9,
|
||||
InvalidEnum = 10,
|
||||
EnumCount = 10,
|
||||
};
|
||||
|
||||
// Common function that creates the pipeline for the specified function, binds it and prepares
|
||||
|
@ -346,6 +368,7 @@ class UtilsVk : angle::NonCopyable
|
|||
// appropriate parameters.
|
||||
angle::Result ensureBufferClearResourcesInitialized(ContextVk *contextVk);
|
||||
angle::Result ensureConvertIndexResourcesInitialized(ContextVk *contextVk);
|
||||
angle::Result ensureConvertIndexIndirectResourcesInitialized(ContextVk *contextVk);
|
||||
angle::Result ensureConvertVertexResourcesInitialized(ContextVk *contextVk);
|
||||
angle::Result ensureImageClearResourcesInitialized(ContextVk *contextVk);
|
||||
angle::Result ensureImageCopyResourcesInitialized(ContextVk *contextVk);
|
||||
|
|
|
@ -163,6 +163,35 @@ angle::Result VertexArrayVk::convertIndexBufferGPU(ContextVk *contextVk,
|
|||
return contextVk->getUtils().convertIndexBuffer(contextVk, dest, src, params);
|
||||
}
|
||||
|
||||
angle::Result VertexArrayVk::convertIndexBufferIndirectGPU(ContextVk *contextVk,
|
||||
BufferVk *cmdBufferVk,
|
||||
BufferVk *indexBufferVk,
|
||||
const void *offset)
|
||||
{
|
||||
intptr_t indirectBufferOffset = reinterpret_cast<intptr_t>(offset);
|
||||
size_t srcDataSize = static_cast<size_t>(indexBufferVk->getSize());
|
||||
|
||||
mTranslatedByteIndexData.releaseInFlightBuffers(contextVk);
|
||||
|
||||
ANGLE_TRY(mTranslatedByteIndexData.allocate(contextVk, sizeof(GLushort) * srcDataSize, nullptr,
|
||||
nullptr, &mCurrentElementArrayBufferOffset,
|
||||
nullptr));
|
||||
mCurrentElementArrayBuffer = mTranslatedByteIndexData.getCurrentBuffer();
|
||||
|
||||
vk::BufferHelper *dest = mTranslatedByteIndexData.getCurrentBuffer();
|
||||
vk::BufferHelper *src = &indexBufferVk->getBuffer();
|
||||
|
||||
// Copy relevant section of the source into destination at allocated offset. Note that the
|
||||
// offset returned by allocate() above is in bytes. As is the indices offset pointer.
|
||||
UtilsVk::ConvertIndexIndirectParameters params = {};
|
||||
params.indirectBufferOffset = static_cast<uint32_t>(indirectBufferOffset);
|
||||
params.dstOffset = static_cast<uint32_t>(mCurrentElementArrayBufferOffset);
|
||||
params.maxIndex = static_cast<uint32_t>(indexBufferVk->getSize());
|
||||
|
||||
return contextVk->getUtils().convertIndexIndirectBuffer(contextVk, &cmdBufferVk->getBuffer(),
|
||||
dest, src, params);
|
||||
}
|
||||
|
||||
angle::Result VertexArrayVk::convertIndexBufferCPU(ContextVk *contextVk,
|
||||
gl::DrawElementsType indexType,
|
||||
size_t indexCount,
|
||||
|
@ -486,7 +515,7 @@ angle::Result VertexArrayVk::syncDirtyAttrib(ContextVk *contextVk,
|
|||
}
|
||||
else
|
||||
{
|
||||
vk::BufferHelper &bufferHelper = bufferVk->getBuffer();
|
||||
vk::BufferHelper &bufferHelper = bufferVk->getBuffer();
|
||||
mCurrentArrayBuffers[attribIndex] = &bufferHelper;
|
||||
mCurrentArrayBufferHandles[attribIndex] = bufferHelper.getBuffer().getHandle();
|
||||
mCurrentArrayBufferOffsets[attribIndex] = binding.getOffset();
|
||||
|
|
|
@ -82,6 +82,11 @@ class VertexArrayVk : public VertexArrayImpl
|
|||
BufferVk *bufferVk,
|
||||
const void *indices);
|
||||
|
||||
angle::Result convertIndexBufferIndirectGPU(ContextVk *contextVk,
|
||||
BufferVk *cmdBufferVk,
|
||||
BufferVk *indexBufferVk,
|
||||
const void *indices);
|
||||
|
||||
angle::Result convertIndexBufferCPU(ContextVk *contextVk,
|
||||
gl::DrawElementsType indexType,
|
||||
size_t indexCount,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// 7.12.3226
|
||||
#pragma once
|
||||
const uint32_t kConvertIndex_comp_00000000[] = {
|
||||
0x07230203,0x00010000,0x00080007,0x0000007d,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x07230203,0x00010000,0x00080007,0x00000089,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000041,0x00060010,0x00000004,
|
||||
0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000048,0x00060010,0x00000004,
|
||||
0x00000011,0x00000040,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005,
|
||||
0x00000004,0x6e69616d,0x00000000,0x00060005,0x0000000a,0x6c6c7550,0x65646e49,0x31752878,
|
||||
0x0000003b,0x00040005,0x00000009,0x65646e69,0x00000078,0x00090005,0x00000010,0x6b636150,
|
||||
|
@ -17,77 +17,86 @@ const uint32_t kConvertIndex_comp_00000000[] = {
|
|||
0x00000000,0x00030005,0x00000016,0x00000000,0x00050005,0x0000001d,0x42637273,0x6b636f6c,
|
||||
0x00000000,0x00030005,0x0000001f,0x00637273,0x00050006,0x0000001f,0x00000000,0x44637273,
|
||||
0x00617461,0x00030005,0x00000021,0x00000000,0x00060005,0x00000028,0x43637273,0x6f706d6f,
|
||||
0x746e656e,0x00000000,0x00040005,0x0000002c,0x756c6176,0x00000065,0x00040005,0x0000003e,
|
||||
0x65646e69,0x00000078,0x00080005,0x00000041,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,
|
||||
0x496e6f69,0x00000044,0x00050005,0x00000050,0x56747364,0x65756c61,0x00000000,0x00050005,
|
||||
0x00000051,0x56637273,0x65756c61,0x00000000,0x00040005,0x00000052,0x61726170,0x0000006d,
|
||||
0x00040005,0x00000055,0x61726170,0x0000006d,0x00040005,0x00000057,0x61726170,0x0000006d,
|
||||
0x00040005,0x00000058,0x61726170,0x0000006d,0x00050005,0x00000064,0x56637273,0x65756c61,
|
||||
0x00000000,0x00040005,0x00000067,0x61726170,0x0000006d,0x00040005,0x00000069,0x61726170,
|
||||
0x0000006d,0x00040005,0x0000006b,0x61726170,0x0000006d,0x00040005,0x0000006c,0x61726170,
|
||||
0x0000006d,0x00030005,0x00000071,0x00747364,0x00050006,0x00000071,0x00000000,0x44747364,
|
||||
0x00617461,0x00030005,0x00000073,0x00000000,0x00050048,0x00000014,0x00000000,0x00000023,
|
||||
0x00000000,0x00050048,0x00000014,0x00000001,0x00000023,0x00000004,0x00050048,0x00000014,
|
||||
0x00000002,0x00000023,0x00000008,0x00050048,0x00000014,0x00000003,0x00000023,0x0000000c,
|
||||
0x00030047,0x00000014,0x00000002,0x00040047,0x0000001e,0x00000006,0x00000004,0x00040048,
|
||||
0x0000001f,0x00000000,0x00000018,0x00050048,0x0000001f,0x00000000,0x00000023,0x00000000,
|
||||
0x00030047,0x0000001f,0x00000003,0x00040047,0x00000021,0x00000022,0x00000000,0x00040047,
|
||||
0x00000021,0x00000021,0x00000001,0x00040047,0x00000041,0x0000000b,0x0000001c,0x00040047,
|
||||
0x00000070,0x00000006,0x00000004,0x00050048,0x00000071,0x00000000,0x00000023,0x00000000,
|
||||
0x00030047,0x00000071,0x00000003,0x00040047,0x00000073,0x00000022,0x00000000,0x00040047,
|
||||
0x00000073,0x00000021,0x00000000,0x00040047,0x0000007c,0x0000000b,0x00000019,0x00020013,
|
||||
0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000000,
|
||||
0x00040020,0x00000007,0x00000007,0x00000006,0x00040021,0x00000008,0x00000006,0x00000007,
|
||||
0x00060021,0x0000000c,0x00000002,0x00000007,0x00000007,0x00000007,0x0006001e,0x00000014,
|
||||
0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x00000015,0x00000009,0x00000014,
|
||||
0x0004003b,0x00000015,0x00000016,0x00000009,0x00040015,0x00000017,0x00000020,0x00000001,
|
||||
0x0004002b,0x00000017,0x00000018,0x00000000,0x00040020,0x00000019,0x00000009,0x00000006,
|
||||
0x0003001d,0x0000001e,0x00000006,0x0003001e,0x0000001f,0x0000001e,0x00040020,0x00000020,
|
||||
0x00000002,0x0000001f,0x0004003b,0x00000020,0x00000021,0x00000002,0x0004002b,0x00000017,
|
||||
0x00000023,0x00000002,0x00040020,0x00000025,0x00000002,0x00000006,0x0004002b,0x00000006,
|
||||
0x0000002a,0x00000003,0x0004002b,0x00000017,0x0000002f,0x00000003,0x0004002b,0x00000006,
|
||||
0x00000032,0x000000ff,0x0004002b,0x00000017,0x00000039,0x00000004,0x00040017,0x0000003f,
|
||||
0x00000006,0x00000003,0x00040020,0x00000040,0x00000001,0x0000003f,0x0004003b,0x00000040,
|
||||
0x00000041,0x00000001,0x0004002b,0x00000006,0x00000042,0x00000000,0x00040020,0x00000043,
|
||||
0x00000001,0x00000006,0x0004002b,0x00000017,0x00000046,0x00000001,0x00020014,0x0000004b,
|
||||
0x0004002b,0x00000006,0x0000005d,0x00000001,0x0003001d,0x00000070,0x00000006,0x0003001e,
|
||||
0x00000071,0x00000070,0x00040020,0x00000072,0x00000002,0x00000071,0x0004003b,0x00000072,
|
||||
0x00000073,0x00000002,0x0004002b,0x00000006,0x0000007b,0x00000040,0x0006002c,0x0000003f,
|
||||
0x0000007c,0x0000007b,0x0000005d,0x0000005d,0x00050036,0x00000002,0x00000004,0x00000000,
|
||||
0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x0000003e,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000050,0x00000007,0x0004003b,0x00000007,0x00000051,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000052,0x00000007,0x0004003b,0x00000007,0x00000055,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000057,0x00000007,0x0004003b,0x00000007,0x00000058,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000064,0x00000007,0x0004003b,0x00000007,0x00000067,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000069,0x00000007,0x0004003b,0x00000007,0x0000006b,0x00000007,0x0004003b,
|
||||
0x00000007,0x0000006c,0x00000007,0x00050041,0x00000043,0x00000044,0x00000041,0x00000042,
|
||||
0x0004003d,0x00000006,0x00000045,0x00000044,0x000500c4,0x00000006,0x00000047,0x00000045,
|
||||
0x00000046,0x0003003e,0x0000003e,0x00000047,0x0004003d,0x00000006,0x00000048,0x0000003e,
|
||||
0x00050041,0x00000019,0x00000049,0x00000016,0x00000023,0x0004003d,0x00000006,0x0000004a,
|
||||
0x00000049,0x000500ae,0x0000004b,0x0000004c,0x00000048,0x0000004a,0x000300f7,0x0000004e,
|
||||
0x00000000,0x000400fa,0x0000004c,0x0000004d,0x0000004e,0x000200f8,0x0000004d,0x000100fd,
|
||||
0x000200f8,0x0000004e,0x0003003e,0x00000050,0x00000042,0x0004003d,0x00000006,0x00000053,
|
||||
0x0000003e,0x0003003e,0x00000052,0x00000053,0x00050039,0x00000006,0x00000054,0x0000000a,
|
||||
0x00000052,0x0003003e,0x00000051,0x00000054,0x0004003d,0x00000006,0x00000056,0x00000051,
|
||||
0x0003003e,0x00000055,0x00000056,0x0003003e,0x00000057,0x00000042,0x0004003d,0x00000006,
|
||||
0x00000059,0x00000050,0x0003003e,0x00000058,0x00000059,0x00070039,0x00000002,0x0000005a,
|
||||
0x00000010,0x00000055,0x00000057,0x00000058,0x0004003d,0x00000006,0x0000005b,0x00000058,
|
||||
0x0003003e,0x00000050,0x0000005b,0x0004003d,0x00000006,0x0000005c,0x0000003e,0x00050080,
|
||||
0x00000006,0x0000005e,0x0000005c,0x0000005d,0x00050041,0x00000019,0x0000005f,0x00000016,
|
||||
0x00000023,0x0004003d,0x00000006,0x00000060,0x0000005f,0x000500b0,0x0000004b,0x00000061,
|
||||
0x0000005e,0x00000060,0x000300f7,0x00000063,0x00000000,0x000400fa,0x00000061,0x00000062,
|
||||
0x00000063,0x000200f8,0x00000062,0x0004003d,0x00000006,0x00000065,0x0000003e,0x00050080,
|
||||
0x00000006,0x00000066,0x00000065,0x0000005d,0x0003003e,0x00000067,0x00000066,0x00050039,
|
||||
0x00000006,0x00000068,0x0000000a,0x00000067,0x0003003e,0x00000064,0x00000068,0x0004003d,
|
||||
0x00000006,0x0000006a,0x00000064,0x0003003e,0x00000069,0x0000006a,0x0003003e,0x0000006b,
|
||||
0x0000005d,0x0004003d,0x00000006,0x0000006d,0x00000050,0x0003003e,0x0000006c,0x0000006d,
|
||||
0x00070039,0x00000002,0x0000006e,0x00000010,0x00000069,0x0000006b,0x0000006c,0x0004003d,
|
||||
0x00000006,0x0000006f,0x0000006c,0x0003003e,0x00000050,0x0000006f,0x000200f9,0x00000063,
|
||||
0x000200f8,0x00000063,0x00050041,0x00000019,0x00000074,0x00000016,0x00000046,0x0004003d,
|
||||
0x00000006,0x00000075,0x00000074,0x00050041,0x00000043,0x00000076,0x00000041,0x00000042,
|
||||
0x0004003d,0x00000006,0x00000077,0x00000076,0x00050080,0x00000006,0x00000078,0x00000075,
|
||||
0x00000077,0x0004003d,0x00000006,0x00000079,0x00000050,0x00060041,0x00000025,0x0000007a,
|
||||
0x00000073,0x00000018,0x00000078,0x0003003e,0x0000007a,0x00000079,0x000100fd,0x00010038,
|
||||
0x746e656e,0x00000000,0x00040005,0x0000002c,0x756c6176,0x00000065,0x00050005,0x0000003e,
|
||||
0x73726966,0x646e4974,0x00007865,0x00050005,0x00000040,0x49646e65,0x7865646e,0x00000000,
|
||||
0x00040005,0x00000045,0x65646e69,0x00000078,0x00080005,0x00000048,0x475f6c67,0x61626f6c,
|
||||
0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005,0x00000058,0x56747364,0x65756c61,
|
||||
0x00000000,0x00050005,0x0000005e,0x56637273,0x65756c61,0x00000000,0x00040005,0x0000005f,
|
||||
0x61726170,0x0000006d,0x00040005,0x00000062,0x61726170,0x0000006d,0x00040005,0x00000064,
|
||||
0x61726170,0x0000006d,0x00040005,0x00000065,0x61726170,0x0000006d,0x00050005,0x00000070,
|
||||
0x56637273,0x65756c61,0x00000000,0x00040005,0x00000073,0x61726170,0x0000006d,0x00040005,
|
||||
0x00000075,0x61726170,0x0000006d,0x00040005,0x00000077,0x61726170,0x0000006d,0x00040005,
|
||||
0x00000078,0x61726170,0x0000006d,0x00030005,0x0000007d,0x00747364,0x00050006,0x0000007d,
|
||||
0x00000000,0x44747364,0x00617461,0x00030005,0x0000007f,0x00000000,0x00050048,0x00000014,
|
||||
0x00000000,0x00000023,0x00000000,0x00050048,0x00000014,0x00000001,0x00000023,0x00000004,
|
||||
0x00050048,0x00000014,0x00000002,0x00000023,0x00000008,0x00050048,0x00000014,0x00000003,
|
||||
0x00000023,0x0000000c,0x00030047,0x00000014,0x00000002,0x00040047,0x0000001e,0x00000006,
|
||||
0x00000004,0x00040048,0x0000001f,0x00000000,0x00000018,0x00050048,0x0000001f,0x00000000,
|
||||
0x00000023,0x00000000,0x00030047,0x0000001f,0x00000003,0x00040047,0x00000021,0x00000022,
|
||||
0x00000000,0x00040047,0x00000021,0x00000021,0x00000001,0x00040047,0x00000048,0x0000000b,
|
||||
0x0000001c,0x00040047,0x0000007c,0x00000006,0x00000004,0x00050048,0x0000007d,0x00000000,
|
||||
0x00000023,0x00000000,0x00030047,0x0000007d,0x00000003,0x00040047,0x0000007f,0x00000022,
|
||||
0x00000000,0x00040047,0x0000007f,0x00000021,0x00000000,0x00040047,0x00000088,0x0000000b,
|
||||
0x00000019,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,
|
||||
0x00000020,0x00000000,0x00040020,0x00000007,0x00000007,0x00000006,0x00040021,0x00000008,
|
||||
0x00000006,0x00000007,0x00060021,0x0000000c,0x00000002,0x00000007,0x00000007,0x00000007,
|
||||
0x0006001e,0x00000014,0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x00000015,
|
||||
0x00000009,0x00000014,0x0004003b,0x00000015,0x00000016,0x00000009,0x00040015,0x00000017,
|
||||
0x00000020,0x00000001,0x0004002b,0x00000017,0x00000018,0x00000000,0x00040020,0x00000019,
|
||||
0x00000009,0x00000006,0x0003001d,0x0000001e,0x00000006,0x0003001e,0x0000001f,0x0000001e,
|
||||
0x00040020,0x00000020,0x00000002,0x0000001f,0x0004003b,0x00000020,0x00000021,0x00000002,
|
||||
0x0004002b,0x00000017,0x00000023,0x00000002,0x00040020,0x00000025,0x00000002,0x00000006,
|
||||
0x0004002b,0x00000006,0x0000002a,0x00000003,0x0004002b,0x00000017,0x0000002f,0x00000003,
|
||||
0x0004002b,0x00000006,0x00000032,0x000000ff,0x0004002b,0x00000017,0x00000039,0x00000004,
|
||||
0x0004002b,0x00000006,0x0000003f,0x00000000,0x00040017,0x00000046,0x00000006,0x00000003,
|
||||
0x00040020,0x00000047,0x00000001,0x00000046,0x0004003b,0x00000047,0x00000048,0x00000001,
|
||||
0x00040020,0x00000049,0x00000001,0x00000006,0x0004002b,0x00000017,0x0000004d,0x00000001,
|
||||
0x00020014,0x00000053,0x0004002b,0x00000006,0x0000006a,0x00000001,0x0003001d,0x0000007c,
|
||||
0x00000006,0x0003001e,0x0000007d,0x0000007c,0x00040020,0x0000007e,0x00000002,0x0000007d,
|
||||
0x0004003b,0x0000007e,0x0000007f,0x00000002,0x0004002b,0x00000006,0x00000087,0x00000040,
|
||||
0x0006002c,0x00000046,0x00000088,0x00000087,0x0000006a,0x0000006a,0x00050036,0x00000002,
|
||||
0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x0000003e,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000040,0x00000007,0x0004003b,0x00000007,0x00000045,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000058,0x00000007,0x0004003b,0x00000007,0x0000005e,
|
||||
0x00000007,0x0004003b,0x00000007,0x0000005f,0x00000007,0x0004003b,0x00000007,0x00000062,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000064,0x00000007,0x0004003b,0x00000007,0x00000065,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000070,0x00000007,0x0004003b,0x00000007,0x00000073,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000075,0x00000007,0x0004003b,0x00000007,0x00000077,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000078,0x00000007,0x0003003e,0x0000003e,0x0000003f,
|
||||
0x0004003d,0x00000006,0x00000041,0x0000003e,0x00050041,0x00000019,0x00000042,0x00000016,
|
||||
0x00000023,0x0004003d,0x00000006,0x00000043,0x00000042,0x00050080,0x00000006,0x00000044,
|
||||
0x00000041,0x00000043,0x0003003e,0x00000040,0x00000044,0x00050041,0x00000049,0x0000004a,
|
||||
0x00000048,0x0000003f,0x0004003d,0x00000006,0x0000004b,0x0000004a,0x0004003d,0x00000006,
|
||||
0x0000004c,0x0000003e,0x000500c2,0x00000006,0x0000004e,0x0000004c,0x0000004d,0x00050080,
|
||||
0x00000006,0x0000004f,0x0000004b,0x0000004e,0x000500c4,0x00000006,0x00000050,0x0000004f,
|
||||
0x0000004d,0x0003003e,0x00000045,0x00000050,0x0004003d,0x00000006,0x00000051,0x00000045,
|
||||
0x0004003d,0x00000006,0x00000052,0x00000040,0x000500ae,0x00000053,0x00000054,0x00000051,
|
||||
0x00000052,0x000300f7,0x00000056,0x00000000,0x000400fa,0x00000054,0x00000055,0x00000056,
|
||||
0x000200f8,0x00000055,0x000100fd,0x000200f8,0x00000056,0x0003003e,0x00000058,0x0000003f,
|
||||
0x0004003d,0x00000006,0x00000059,0x00000045,0x0004003d,0x00000006,0x0000005a,0x0000003e,
|
||||
0x000500ae,0x00000053,0x0000005b,0x00000059,0x0000005a,0x000300f7,0x0000005d,0x00000000,
|
||||
0x000400fa,0x0000005b,0x0000005c,0x0000005d,0x000200f8,0x0000005c,0x0004003d,0x00000006,
|
||||
0x00000060,0x00000045,0x0003003e,0x0000005f,0x00000060,0x00050039,0x00000006,0x00000061,
|
||||
0x0000000a,0x0000005f,0x0003003e,0x0000005e,0x00000061,0x0004003d,0x00000006,0x00000063,
|
||||
0x0000005e,0x0003003e,0x00000062,0x00000063,0x0003003e,0x00000064,0x0000003f,0x0004003d,
|
||||
0x00000006,0x00000066,0x00000058,0x0003003e,0x00000065,0x00000066,0x00070039,0x00000002,
|
||||
0x00000067,0x00000010,0x00000062,0x00000064,0x00000065,0x0004003d,0x00000006,0x00000068,
|
||||
0x00000065,0x0003003e,0x00000058,0x00000068,0x000200f9,0x0000005d,0x000200f8,0x0000005d,
|
||||
0x0004003d,0x00000006,0x00000069,0x00000045,0x00050080,0x00000006,0x0000006b,0x00000069,
|
||||
0x0000006a,0x0004003d,0x00000006,0x0000006c,0x00000040,0x000500b0,0x00000053,0x0000006d,
|
||||
0x0000006b,0x0000006c,0x000300f7,0x0000006f,0x00000000,0x000400fa,0x0000006d,0x0000006e,
|
||||
0x0000006f,0x000200f8,0x0000006e,0x0004003d,0x00000006,0x00000071,0x00000045,0x00050080,
|
||||
0x00000006,0x00000072,0x00000071,0x0000006a,0x0003003e,0x00000073,0x00000072,0x00050039,
|
||||
0x00000006,0x00000074,0x0000000a,0x00000073,0x0003003e,0x00000070,0x00000074,0x0004003d,
|
||||
0x00000006,0x00000076,0x00000070,0x0003003e,0x00000075,0x00000076,0x0003003e,0x00000077,
|
||||
0x0000006a,0x0004003d,0x00000006,0x00000079,0x00000058,0x0003003e,0x00000078,0x00000079,
|
||||
0x00070039,0x00000002,0x0000007a,0x00000010,0x00000075,0x00000077,0x00000078,0x0004003d,
|
||||
0x00000006,0x0000007b,0x00000078,0x0003003e,0x00000058,0x0000007b,0x000200f9,0x0000006f,
|
||||
0x000200f8,0x0000006f,0x00050041,0x00000019,0x00000080,0x00000016,0x0000004d,0x0004003d,
|
||||
0x00000006,0x00000081,0x00000080,0x00050041,0x00000049,0x00000082,0x00000048,0x0000003f,
|
||||
0x0004003d,0x00000006,0x00000083,0x00000082,0x00050080,0x00000006,0x00000084,0x00000081,
|
||||
0x00000083,0x0004003d,0x00000006,0x00000085,0x00000058,0x00060041,0x00000025,0x00000086,
|
||||
0x0000007f,0x00000018,0x00000084,0x0003003e,0x00000086,0x00000085,0x000100fd,0x00010038,
|
||||
0x00050036,0x00000006,0x0000000a,0x00000000,0x00000008,0x00030037,0x00000007,0x00000009,
|
||||
0x000200f8,0x0000000b,0x0004003b,0x00000007,0x00000012,0x00000007,0x0004003b,0x00000007,
|
||||
0x0000001d,0x00000007,0x0004003b,0x00000007,0x00000028,0x00000007,0x0004003b,0x00000007,
|
||||
|
@ -143,7 +152,9 @@ const uint32_t kConvertIndex_comp_00000000[] = {
|
|||
//
|
||||
// uint PullIndex(uint index)
|
||||
// {
|
||||
//
|
||||
// uint srcIndex = index + srcOffset;
|
||||
//
|
||||
// uint srcBlock = srcData[srcIndex >> 2];
|
||||
// uint srcComponent =(srcIndex & 3);
|
||||
//
|
||||
|
@ -161,17 +172,23 @@ const uint32_t kConvertIndex_comp_00000000[] = {
|
|||
// void main()
|
||||
// {
|
||||
//
|
||||
// uint index =(gl_GlobalInvocationID . x << 1);
|
||||
// uint firstIndex = 0;
|
||||
// uint endIndex = firstIndex + maxIndex;
|
||||
//
|
||||
// if(index >= maxIndex)
|
||||
// uint index =((gl_GlobalInvocationID . x +(firstIndex >> 1))<< 1);
|
||||
//
|
||||
// if(index >= endIndex)
|
||||
// return;
|
||||
//
|
||||
// uint dstValue = 0;
|
||||
//
|
||||
// uint srcValue = PullIndex(index);
|
||||
// PackIndexValue(srcValue, 0, dstValue);
|
||||
// if(index >= firstIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index);
|
||||
// PackIndexValue(srcValue, 0, dstValue);
|
||||
// }
|
||||
//
|
||||
// if(index + 1 < maxIndex)
|
||||
// if(index + 1 < endIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index + 1);
|
||||
// PackIndexValue(srcValue, 1, dstValue);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// 7.12.3226
|
||||
#pragma once
|
||||
const uint32_t kConvertIndex_comp_00000001[] = {
|
||||
0x07230203,0x00010000,0x00080007,0x00000082,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x07230203,0x00010000,0x00080007,0x0000008e,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000047,0x00060010,0x00000004,
|
||||
0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x0000004e,0x00060010,0x00000004,
|
||||
0x00000011,0x00000040,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005,
|
||||
0x00000004,0x6e69616d,0x00000000,0x00060005,0x0000000a,0x6c6c7550,0x65646e49,0x31752878,
|
||||
0x0000003b,0x00040005,0x00000009,0x65646e69,0x00000078,0x00090005,0x00000010,0x6b636150,
|
||||
|
@ -17,78 +17,87 @@ const uint32_t kConvertIndex_comp_00000001[] = {
|
|||
0x00000000,0x00030005,0x00000016,0x00000000,0x00050005,0x0000001d,0x42637273,0x6b636f6c,
|
||||
0x00000000,0x00030005,0x0000001f,0x00637273,0x00050006,0x0000001f,0x00000000,0x44637273,
|
||||
0x00617461,0x00030005,0x00000021,0x00000000,0x00060005,0x00000028,0x43637273,0x6f706d6f,
|
||||
0x746e656e,0x00000000,0x00040005,0x0000002c,0x756c6176,0x00000065,0x00040005,0x00000044,
|
||||
0x65646e69,0x00000078,0x00080005,0x00000047,0x475f6c67,0x61626f6c,0x766e496c,0x7461636f,
|
||||
0x496e6f69,0x00000044,0x00050005,0x00000055,0x56747364,0x65756c61,0x00000000,0x00050005,
|
||||
0x00000056,0x56637273,0x65756c61,0x00000000,0x00040005,0x00000057,0x61726170,0x0000006d,
|
||||
0x00040005,0x0000005a,0x61726170,0x0000006d,0x00040005,0x0000005c,0x61726170,0x0000006d,
|
||||
0x00040005,0x0000005d,0x61726170,0x0000006d,0x00050005,0x00000069,0x56637273,0x65756c61,
|
||||
0x00000000,0x00040005,0x0000006c,0x61726170,0x0000006d,0x00040005,0x0000006e,0x61726170,
|
||||
0x0000006d,0x00040005,0x00000070,0x61726170,0x0000006d,0x00040005,0x00000071,0x61726170,
|
||||
0x0000006d,0x00030005,0x00000076,0x00747364,0x00050006,0x00000076,0x00000000,0x44747364,
|
||||
0x00617461,0x00030005,0x00000078,0x00000000,0x00050048,0x00000014,0x00000000,0x00000023,
|
||||
0x00000000,0x00050048,0x00000014,0x00000001,0x00000023,0x00000004,0x00050048,0x00000014,
|
||||
0x00000002,0x00000023,0x00000008,0x00050048,0x00000014,0x00000003,0x00000023,0x0000000c,
|
||||
0x00030047,0x00000014,0x00000002,0x00040047,0x0000001e,0x00000006,0x00000004,0x00040048,
|
||||
0x0000001f,0x00000000,0x00000018,0x00050048,0x0000001f,0x00000000,0x00000023,0x00000000,
|
||||
0x00030047,0x0000001f,0x00000003,0x00040047,0x00000021,0x00000022,0x00000000,0x00040047,
|
||||
0x00000021,0x00000021,0x00000001,0x00040047,0x00000047,0x0000000b,0x0000001c,0x00040047,
|
||||
0x00000075,0x00000006,0x00000004,0x00050048,0x00000076,0x00000000,0x00000023,0x00000000,
|
||||
0x00030047,0x00000076,0x00000003,0x00040047,0x00000078,0x00000022,0x00000000,0x00040047,
|
||||
0x00000078,0x00000021,0x00000000,0x00040047,0x00000081,0x0000000b,0x00000019,0x00020013,
|
||||
0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,0x00000020,0x00000000,
|
||||
0x00040020,0x00000007,0x00000007,0x00000006,0x00040021,0x00000008,0x00000006,0x00000007,
|
||||
0x00060021,0x0000000c,0x00000002,0x00000007,0x00000007,0x00000007,0x0006001e,0x00000014,
|
||||
0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x00000015,0x00000009,0x00000014,
|
||||
0x0004003b,0x00000015,0x00000016,0x00000009,0x00040015,0x00000017,0x00000020,0x00000001,
|
||||
0x0004002b,0x00000017,0x00000018,0x00000000,0x00040020,0x00000019,0x00000009,0x00000006,
|
||||
0x0003001d,0x0000001e,0x00000006,0x0003001e,0x0000001f,0x0000001e,0x00040020,0x00000020,
|
||||
0x00000002,0x0000001f,0x0004003b,0x00000020,0x00000021,0x00000002,0x0004002b,0x00000017,
|
||||
0x00000023,0x00000002,0x00040020,0x00000025,0x00000002,0x00000006,0x0004002b,0x00000006,
|
||||
0x0000002a,0x00000003,0x0004002b,0x00000017,0x0000002f,0x00000003,0x0004002b,0x00000006,
|
||||
0x00000032,0x000000ff,0x00020014,0x00000035,0x0004002b,0x00000006,0x00000039,0x0000ffff,
|
||||
0x0004002b,0x00000017,0x0000003f,0x00000004,0x00040017,0x00000045,0x00000006,0x00000003,
|
||||
0x00040020,0x00000046,0x00000001,0x00000045,0x0004003b,0x00000046,0x00000047,0x00000001,
|
||||
0x0004002b,0x00000006,0x00000048,0x00000000,0x00040020,0x00000049,0x00000001,0x00000006,
|
||||
0x0004002b,0x00000017,0x0000004c,0x00000001,0x0004002b,0x00000006,0x00000062,0x00000001,
|
||||
0x0003001d,0x00000075,0x00000006,0x0003001e,0x00000076,0x00000075,0x00040020,0x00000077,
|
||||
0x00000002,0x00000076,0x0004003b,0x00000077,0x00000078,0x00000002,0x0004002b,0x00000006,
|
||||
0x00000080,0x00000040,0x0006002c,0x00000045,0x00000081,0x00000080,0x00000062,0x00000062,
|
||||
0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,
|
||||
0x00000007,0x00000044,0x00000007,0x0004003b,0x00000007,0x00000055,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000056,0x00000007,0x0004003b,0x00000007,0x00000057,0x00000007,0x0004003b,
|
||||
0x00000007,0x0000005a,0x00000007,0x0004003b,0x00000007,0x0000005c,0x00000007,0x0004003b,
|
||||
0x00000007,0x0000005d,0x00000007,0x0004003b,0x00000007,0x00000069,0x00000007,0x0004003b,
|
||||
0x00000007,0x0000006c,0x00000007,0x0004003b,0x00000007,0x0000006e,0x00000007,0x0004003b,
|
||||
0x00000007,0x00000070,0x00000007,0x0004003b,0x00000007,0x00000071,0x00000007,0x00050041,
|
||||
0x00000049,0x0000004a,0x00000047,0x00000048,0x0004003d,0x00000006,0x0000004b,0x0000004a,
|
||||
0x000500c4,0x00000006,0x0000004d,0x0000004b,0x0000004c,0x0003003e,0x00000044,0x0000004d,
|
||||
0x0004003d,0x00000006,0x0000004e,0x00000044,0x00050041,0x00000019,0x0000004f,0x00000016,
|
||||
0x00000023,0x0004003d,0x00000006,0x00000050,0x0000004f,0x000500ae,0x00000035,0x00000051,
|
||||
0x0000004e,0x00000050,0x000300f7,0x00000053,0x00000000,0x000400fa,0x00000051,0x00000052,
|
||||
0x00000053,0x000200f8,0x00000052,0x000100fd,0x000200f8,0x00000053,0x0003003e,0x00000055,
|
||||
0x00000048,0x0004003d,0x00000006,0x00000058,0x00000044,0x0003003e,0x00000057,0x00000058,
|
||||
0x00050039,0x00000006,0x00000059,0x0000000a,0x00000057,0x0003003e,0x00000056,0x00000059,
|
||||
0x0004003d,0x00000006,0x0000005b,0x00000056,0x0003003e,0x0000005a,0x0000005b,0x0003003e,
|
||||
0x0000005c,0x00000048,0x0004003d,0x00000006,0x0000005e,0x00000055,0x0003003e,0x0000005d,
|
||||
0x0000005e,0x00070039,0x00000002,0x0000005f,0x00000010,0x0000005a,0x0000005c,0x0000005d,
|
||||
0x0004003d,0x00000006,0x00000060,0x0000005d,0x0003003e,0x00000055,0x00000060,0x0004003d,
|
||||
0x00000006,0x00000061,0x00000044,0x00050080,0x00000006,0x00000063,0x00000061,0x00000062,
|
||||
0x00050041,0x00000019,0x00000064,0x00000016,0x00000023,0x0004003d,0x00000006,0x00000065,
|
||||
0x00000064,0x000500b0,0x00000035,0x00000066,0x00000063,0x00000065,0x000300f7,0x00000068,
|
||||
0x00000000,0x000400fa,0x00000066,0x00000067,0x00000068,0x000200f8,0x00000067,0x0004003d,
|
||||
0x00000006,0x0000006a,0x00000044,0x00050080,0x00000006,0x0000006b,0x0000006a,0x00000062,
|
||||
0x0003003e,0x0000006c,0x0000006b,0x00050039,0x00000006,0x0000006d,0x0000000a,0x0000006c,
|
||||
0x0003003e,0x00000069,0x0000006d,0x0004003d,0x00000006,0x0000006f,0x00000069,0x0003003e,
|
||||
0x0000006e,0x0000006f,0x0003003e,0x00000070,0x00000062,0x0004003d,0x00000006,0x00000072,
|
||||
0x00000055,0x0003003e,0x00000071,0x00000072,0x00070039,0x00000002,0x00000073,0x00000010,
|
||||
0x0000006e,0x00000070,0x00000071,0x0004003d,0x00000006,0x00000074,0x00000071,0x0003003e,
|
||||
0x00000055,0x00000074,0x000200f9,0x00000068,0x000200f8,0x00000068,0x00050041,0x00000019,
|
||||
0x00000079,0x00000016,0x0000004c,0x0004003d,0x00000006,0x0000007a,0x00000079,0x00050041,
|
||||
0x00000049,0x0000007b,0x00000047,0x00000048,0x0004003d,0x00000006,0x0000007c,0x0000007b,
|
||||
0x00050080,0x00000006,0x0000007d,0x0000007a,0x0000007c,0x0004003d,0x00000006,0x0000007e,
|
||||
0x00000055,0x00060041,0x00000025,0x0000007f,0x00000078,0x00000018,0x0000007d,0x0003003e,
|
||||
0x0000007f,0x0000007e,0x000100fd,0x00010038,0x00050036,0x00000006,0x0000000a,0x00000000,
|
||||
0x746e656e,0x00000000,0x00040005,0x0000002c,0x756c6176,0x00000065,0x00050005,0x00000044,
|
||||
0x73726966,0x646e4974,0x00007865,0x00050005,0x00000046,0x49646e65,0x7865646e,0x00000000,
|
||||
0x00040005,0x0000004b,0x65646e69,0x00000078,0x00080005,0x0000004e,0x475f6c67,0x61626f6c,
|
||||
0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005,0x0000005d,0x56747364,0x65756c61,
|
||||
0x00000000,0x00050005,0x00000063,0x56637273,0x65756c61,0x00000000,0x00040005,0x00000064,
|
||||
0x61726170,0x0000006d,0x00040005,0x00000067,0x61726170,0x0000006d,0x00040005,0x00000069,
|
||||
0x61726170,0x0000006d,0x00040005,0x0000006a,0x61726170,0x0000006d,0x00050005,0x00000075,
|
||||
0x56637273,0x65756c61,0x00000000,0x00040005,0x00000078,0x61726170,0x0000006d,0x00040005,
|
||||
0x0000007a,0x61726170,0x0000006d,0x00040005,0x0000007c,0x61726170,0x0000006d,0x00040005,
|
||||
0x0000007d,0x61726170,0x0000006d,0x00030005,0x00000082,0x00747364,0x00050006,0x00000082,
|
||||
0x00000000,0x44747364,0x00617461,0x00030005,0x00000084,0x00000000,0x00050048,0x00000014,
|
||||
0x00000000,0x00000023,0x00000000,0x00050048,0x00000014,0x00000001,0x00000023,0x00000004,
|
||||
0x00050048,0x00000014,0x00000002,0x00000023,0x00000008,0x00050048,0x00000014,0x00000003,
|
||||
0x00000023,0x0000000c,0x00030047,0x00000014,0x00000002,0x00040047,0x0000001e,0x00000006,
|
||||
0x00000004,0x00040048,0x0000001f,0x00000000,0x00000018,0x00050048,0x0000001f,0x00000000,
|
||||
0x00000023,0x00000000,0x00030047,0x0000001f,0x00000003,0x00040047,0x00000021,0x00000022,
|
||||
0x00000000,0x00040047,0x00000021,0x00000021,0x00000001,0x00040047,0x0000004e,0x0000000b,
|
||||
0x0000001c,0x00040047,0x00000081,0x00000006,0x00000004,0x00050048,0x00000082,0x00000000,
|
||||
0x00000023,0x00000000,0x00030047,0x00000082,0x00000003,0x00040047,0x00000084,0x00000022,
|
||||
0x00000000,0x00040047,0x00000084,0x00000021,0x00000000,0x00040047,0x0000008d,0x0000000b,
|
||||
0x00000019,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,0x00000006,
|
||||
0x00000020,0x00000000,0x00040020,0x00000007,0x00000007,0x00000006,0x00040021,0x00000008,
|
||||
0x00000006,0x00000007,0x00060021,0x0000000c,0x00000002,0x00000007,0x00000007,0x00000007,
|
||||
0x0006001e,0x00000014,0x00000006,0x00000006,0x00000006,0x00000006,0x00040020,0x00000015,
|
||||
0x00000009,0x00000014,0x0004003b,0x00000015,0x00000016,0x00000009,0x00040015,0x00000017,
|
||||
0x00000020,0x00000001,0x0004002b,0x00000017,0x00000018,0x00000000,0x00040020,0x00000019,
|
||||
0x00000009,0x00000006,0x0003001d,0x0000001e,0x00000006,0x0003001e,0x0000001f,0x0000001e,
|
||||
0x00040020,0x00000020,0x00000002,0x0000001f,0x0004003b,0x00000020,0x00000021,0x00000002,
|
||||
0x0004002b,0x00000017,0x00000023,0x00000002,0x00040020,0x00000025,0x00000002,0x00000006,
|
||||
0x0004002b,0x00000006,0x0000002a,0x00000003,0x0004002b,0x00000017,0x0000002f,0x00000003,
|
||||
0x0004002b,0x00000006,0x00000032,0x000000ff,0x00020014,0x00000035,0x0004002b,0x00000006,
|
||||
0x00000039,0x0000ffff,0x0004002b,0x00000017,0x0000003f,0x00000004,0x0004002b,0x00000006,
|
||||
0x00000045,0x00000000,0x00040017,0x0000004c,0x00000006,0x00000003,0x00040020,0x0000004d,
|
||||
0x00000001,0x0000004c,0x0004003b,0x0000004d,0x0000004e,0x00000001,0x00040020,0x0000004f,
|
||||
0x00000001,0x00000006,0x0004002b,0x00000017,0x00000053,0x00000001,0x0004002b,0x00000006,
|
||||
0x0000006f,0x00000001,0x0003001d,0x00000081,0x00000006,0x0003001e,0x00000082,0x00000081,
|
||||
0x00040020,0x00000083,0x00000002,0x00000082,0x0004003b,0x00000083,0x00000084,0x00000002,
|
||||
0x0004002b,0x00000006,0x0000008c,0x00000040,0x0006002c,0x0000004c,0x0000008d,0x0000008c,
|
||||
0x0000006f,0x0000006f,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,
|
||||
0x00000005,0x0004003b,0x00000007,0x00000044,0x00000007,0x0004003b,0x00000007,0x00000046,
|
||||
0x00000007,0x0004003b,0x00000007,0x0000004b,0x00000007,0x0004003b,0x00000007,0x0000005d,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000063,0x00000007,0x0004003b,0x00000007,0x00000064,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000067,0x00000007,0x0004003b,0x00000007,0x00000069,
|
||||
0x00000007,0x0004003b,0x00000007,0x0000006a,0x00000007,0x0004003b,0x00000007,0x00000075,
|
||||
0x00000007,0x0004003b,0x00000007,0x00000078,0x00000007,0x0004003b,0x00000007,0x0000007a,
|
||||
0x00000007,0x0004003b,0x00000007,0x0000007c,0x00000007,0x0004003b,0x00000007,0x0000007d,
|
||||
0x00000007,0x0003003e,0x00000044,0x00000045,0x0004003d,0x00000006,0x00000047,0x00000044,
|
||||
0x00050041,0x00000019,0x00000048,0x00000016,0x00000023,0x0004003d,0x00000006,0x00000049,
|
||||
0x00000048,0x00050080,0x00000006,0x0000004a,0x00000047,0x00000049,0x0003003e,0x00000046,
|
||||
0x0000004a,0x00050041,0x0000004f,0x00000050,0x0000004e,0x00000045,0x0004003d,0x00000006,
|
||||
0x00000051,0x00000050,0x0004003d,0x00000006,0x00000052,0x00000044,0x000500c2,0x00000006,
|
||||
0x00000054,0x00000052,0x00000053,0x00050080,0x00000006,0x00000055,0x00000051,0x00000054,
|
||||
0x000500c4,0x00000006,0x00000056,0x00000055,0x00000053,0x0003003e,0x0000004b,0x00000056,
|
||||
0x0004003d,0x00000006,0x00000057,0x0000004b,0x0004003d,0x00000006,0x00000058,0x00000046,
|
||||
0x000500ae,0x00000035,0x00000059,0x00000057,0x00000058,0x000300f7,0x0000005b,0x00000000,
|
||||
0x000400fa,0x00000059,0x0000005a,0x0000005b,0x000200f8,0x0000005a,0x000100fd,0x000200f8,
|
||||
0x0000005b,0x0003003e,0x0000005d,0x00000045,0x0004003d,0x00000006,0x0000005e,0x0000004b,
|
||||
0x0004003d,0x00000006,0x0000005f,0x00000044,0x000500ae,0x00000035,0x00000060,0x0000005e,
|
||||
0x0000005f,0x000300f7,0x00000062,0x00000000,0x000400fa,0x00000060,0x00000061,0x00000062,
|
||||
0x000200f8,0x00000061,0x0004003d,0x00000006,0x00000065,0x0000004b,0x0003003e,0x00000064,
|
||||
0x00000065,0x00050039,0x00000006,0x00000066,0x0000000a,0x00000064,0x0003003e,0x00000063,
|
||||
0x00000066,0x0004003d,0x00000006,0x00000068,0x00000063,0x0003003e,0x00000067,0x00000068,
|
||||
0x0003003e,0x00000069,0x00000045,0x0004003d,0x00000006,0x0000006b,0x0000005d,0x0003003e,
|
||||
0x0000006a,0x0000006b,0x00070039,0x00000002,0x0000006c,0x00000010,0x00000067,0x00000069,
|
||||
0x0000006a,0x0004003d,0x00000006,0x0000006d,0x0000006a,0x0003003e,0x0000005d,0x0000006d,
|
||||
0x000200f9,0x00000062,0x000200f8,0x00000062,0x0004003d,0x00000006,0x0000006e,0x0000004b,
|
||||
0x00050080,0x00000006,0x00000070,0x0000006e,0x0000006f,0x0004003d,0x00000006,0x00000071,
|
||||
0x00000046,0x000500b0,0x00000035,0x00000072,0x00000070,0x00000071,0x000300f7,0x00000074,
|
||||
0x00000000,0x000400fa,0x00000072,0x00000073,0x00000074,0x000200f8,0x00000073,0x0004003d,
|
||||
0x00000006,0x00000076,0x0000004b,0x00050080,0x00000006,0x00000077,0x00000076,0x0000006f,
|
||||
0x0003003e,0x00000078,0x00000077,0x00050039,0x00000006,0x00000079,0x0000000a,0x00000078,
|
||||
0x0003003e,0x00000075,0x00000079,0x0004003d,0x00000006,0x0000007b,0x00000075,0x0003003e,
|
||||
0x0000007a,0x0000007b,0x0003003e,0x0000007c,0x0000006f,0x0004003d,0x00000006,0x0000007e,
|
||||
0x0000005d,0x0003003e,0x0000007d,0x0000007e,0x00070039,0x00000002,0x0000007f,0x00000010,
|
||||
0x0000007a,0x0000007c,0x0000007d,0x0004003d,0x00000006,0x00000080,0x0000007d,0x0003003e,
|
||||
0x0000005d,0x00000080,0x000200f9,0x00000074,0x000200f8,0x00000074,0x00050041,0x00000019,
|
||||
0x00000085,0x00000016,0x00000053,0x0004003d,0x00000006,0x00000086,0x00000085,0x00050041,
|
||||
0x0000004f,0x00000087,0x0000004e,0x00000045,0x0004003d,0x00000006,0x00000088,0x00000087,
|
||||
0x00050080,0x00000006,0x00000089,0x00000086,0x00000088,0x0004003d,0x00000006,0x0000008a,
|
||||
0x0000005d,0x00060041,0x00000025,0x0000008b,0x00000084,0x00000018,0x00000089,0x0003003e,
|
||||
0x0000008b,0x0000008a,0x000100fd,0x00010038,0x00050036,0x00000006,0x0000000a,0x00000000,
|
||||
0x00000008,0x00030037,0x00000007,0x00000009,0x000200f8,0x0000000b,0x0004003b,0x00000007,
|
||||
0x00000012,0x00000007,0x0004003b,0x00000007,0x0000001d,0x00000007,0x0004003b,0x00000007,
|
||||
0x00000028,0x00000007,0x0004003b,0x00000007,0x0000002c,0x00000007,0x0004003d,0x00000006,
|
||||
|
@ -146,7 +155,9 @@ const uint32_t kConvertIndex_comp_00000001[] = {
|
|||
//
|
||||
// uint PullIndex(uint index)
|
||||
// {
|
||||
//
|
||||
// uint srcIndex = index + srcOffset;
|
||||
//
|
||||
// uint srcBlock = srcData[srcIndex >> 2];
|
||||
// uint srcComponent =(srcIndex & 3);
|
||||
//
|
||||
|
@ -167,17 +178,23 @@ const uint32_t kConvertIndex_comp_00000001[] = {
|
|||
// void main()
|
||||
// {
|
||||
//
|
||||
// uint index =(gl_GlobalInvocationID . x << 1);
|
||||
// uint firstIndex = 0;
|
||||
// uint endIndex = firstIndex + maxIndex;
|
||||
//
|
||||
// if(index >= maxIndex)
|
||||
// uint index =((gl_GlobalInvocationID . x +(firstIndex >> 1))<< 1);
|
||||
//
|
||||
// if(index >= endIndex)
|
||||
// return;
|
||||
//
|
||||
// uint dstValue = 0;
|
||||
//
|
||||
// uint srcValue = PullIndex(index);
|
||||
// PackIndexValue(srcValue, 0, dstValue);
|
||||
// if(index >= firstIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index);
|
||||
// PackIndexValue(srcValue, 0, dstValue);
|
||||
// }
|
||||
//
|
||||
// if(index + 1 < maxIndex)
|
||||
// if(index + 1 < endIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index + 1);
|
||||
// PackIndexValue(srcValue, 1, dstValue);
|
||||
|
|
|
@ -0,0 +1,216 @@
|
|||
// 7.12.3226
|
||||
#pragma once
|
||||
const uint32_t kConvertIndex_comp_00000002[] = {
|
||||
0x07230203,0x00010000,0x00080007,0x00000094,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000052,0x00060010,0x00000004,
|
||||
0x00000011,0x00000040,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005,
|
||||
0x00000004,0x6e69616d,0x00000000,0x00060005,0x0000000a,0x6c6c7550,0x65646e49,0x31752878,
|
||||
0x0000003b,0x00040005,0x00000009,0x65646e69,0x00000078,0x00090005,0x00000010,0x6b636150,
|
||||
0x65646e49,0x6c615678,0x75286575,0x31753b31,0x3b31753b,0x00000000,0x00050005,0x0000000d,
|
||||
0x56637273,0x65756c61,0x00000000,0x00050005,0x0000000e,0x65646e69,0x646e4978,0x00007865,
|
||||
0x00050005,0x0000000f,0x56747364,0x65756c61,0x00000000,0x00050005,0x00000012,0x49637273,
|
||||
0x7865646e,0x00000000,0x00050005,0x00000014,0x42637273,0x6b636f6c,0x00000000,0x00030005,
|
||||
0x00000016,0x00637273,0x00050006,0x00000016,0x00000000,0x44637273,0x00617461,0x00030005,
|
||||
0x00000018,0x00000000,0x00060005,0x00000021,0x43637273,0x6f706d6f,0x746e656e,0x00000000,
|
||||
0x00040005,0x00000025,0x756c6176,0x00000065,0x00050005,0x00000037,0x65646e69,0x756f4378,
|
||||
0x0000746e,0x00030005,0x00000039,0x00646d63,0x00050006,0x00000039,0x00000000,0x44646d63,
|
||||
0x00617461,0x00030005,0x0000003b,0x00000000,0x00060005,0x0000003c,0x68737550,0x736e6f43,
|
||||
0x746e6174,0x00000073,0x00070006,0x0000003c,0x00000000,0x4f646d63,0x65736666,0x76694474,
|
||||
0x00000034,0x00070006,0x0000003c,0x00000001,0x4f747364,0x65736666,0x76694474,0x00000034,
|
||||
0x00060006,0x0000003c,0x00000002,0x4978616d,0x7865646e,0x00000000,0x00060006,0x0000003c,
|
||||
0x00000003,0x6461705f,0x676e6964,0x00000000,0x00030005,0x0000003e,0x00000000,0x00050005,
|
||||
0x00000044,0x73726966,0x646e4974,0x00007865,0x00050005,0x0000004b,0x49646e65,0x7865646e,
|
||||
0x00000000,0x00040005,0x0000004f,0x65646e69,0x00000078,0x00080005,0x00000052,0x475f6c67,
|
||||
0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005,0x00000063,0x56747364,
|
||||
0x65756c61,0x00000000,0x00050005,0x00000069,0x56637273,0x65756c61,0x00000000,0x00040005,
|
||||
0x0000006a,0x61726170,0x0000006d,0x00040005,0x0000006d,0x61726170,0x0000006d,0x00040005,
|
||||
0x0000006f,0x61726170,0x0000006d,0x00040005,0x00000070,0x61726170,0x0000006d,0x00050005,
|
||||
0x0000007b,0x56637273,0x65756c61,0x00000000,0x00040005,0x0000007e,0x61726170,0x0000006d,
|
||||
0x00040005,0x00000080,0x61726170,0x0000006d,0x00040005,0x00000082,0x61726170,0x0000006d,
|
||||
0x00040005,0x00000083,0x61726170,0x0000006d,0x00030005,0x00000088,0x00747364,0x00050006,
|
||||
0x00000088,0x00000000,0x44747364,0x00617461,0x00030005,0x0000008a,0x00000000,0x00040047,
|
||||
0x00000015,0x00000006,0x00000004,0x00040048,0x00000016,0x00000000,0x00000018,0x00050048,
|
||||
0x00000016,0x00000000,0x00000023,0x00000000,0x00030047,0x00000016,0x00000003,0x00040047,
|
||||
0x00000018,0x00000022,0x00000000,0x00040047,0x00000018,0x00000021,0x00000001,0x00040047,
|
||||
0x00000038,0x00000006,0x00000004,0x00040048,0x00000039,0x00000000,0x00000018,0x00050048,
|
||||
0x00000039,0x00000000,0x00000023,0x00000000,0x00030047,0x00000039,0x00000003,0x00040047,
|
||||
0x0000003b,0x00000022,0x00000000,0x00040047,0x0000003b,0x00000021,0x00000002,0x00050048,
|
||||
0x0000003c,0x00000000,0x00000023,0x00000000,0x00050048,0x0000003c,0x00000001,0x00000023,
|
||||
0x00000004,0x00050048,0x0000003c,0x00000002,0x00000023,0x00000008,0x00050048,0x0000003c,
|
||||
0x00000003,0x00000023,0x0000000c,0x00030047,0x0000003c,0x00000002,0x00040047,0x00000052,
|
||||
0x0000000b,0x0000001c,0x00040047,0x00000087,0x00000006,0x00000004,0x00050048,0x00000088,
|
||||
0x00000000,0x00000023,0x00000000,0x00030047,0x00000088,0x00000003,0x00040047,0x0000008a,
|
||||
0x00000022,0x00000000,0x00040047,0x0000008a,0x00000021,0x00000000,0x00040047,0x00000093,
|
||||
0x0000000b,0x00000019,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,
|
||||
0x00000006,0x00000020,0x00000000,0x00040020,0x00000007,0x00000007,0x00000006,0x00040021,
|
||||
0x00000008,0x00000006,0x00000007,0x00060021,0x0000000c,0x00000002,0x00000007,0x00000007,
|
||||
0x00000007,0x0003001d,0x00000015,0x00000006,0x0003001e,0x00000016,0x00000015,0x00040020,
|
||||
0x00000017,0x00000002,0x00000016,0x0004003b,0x00000017,0x00000018,0x00000002,0x00040015,
|
||||
0x00000019,0x00000020,0x00000001,0x0004002b,0x00000019,0x0000001a,0x00000000,0x0004002b,
|
||||
0x00000019,0x0000001c,0x00000002,0x00040020,0x0000001e,0x00000002,0x00000006,0x0004002b,
|
||||
0x00000006,0x00000023,0x00000003,0x0004002b,0x00000019,0x00000028,0x00000003,0x0004002b,
|
||||
0x00000006,0x0000002b,0x000000ff,0x0004002b,0x00000019,0x00000032,0x00000004,0x0003001d,
|
||||
0x00000038,0x00000006,0x0003001e,0x00000039,0x00000038,0x00040020,0x0000003a,0x00000002,
|
||||
0x00000039,0x0004003b,0x0000003a,0x0000003b,0x00000002,0x0006001e,0x0000003c,0x00000006,
|
||||
0x00000006,0x00000006,0x00000006,0x00040020,0x0000003d,0x00000009,0x0000003c,0x0004003b,
|
||||
0x0000003d,0x0000003e,0x00000009,0x00040020,0x0000003f,0x00000009,0x00000006,0x0004002b,
|
||||
0x00000006,0x00000047,0x00000002,0x00040017,0x00000050,0x00000006,0x00000003,0x00040020,
|
||||
0x00000051,0x00000001,0x00000050,0x0004003b,0x00000051,0x00000052,0x00000001,0x0004002b,
|
||||
0x00000006,0x00000053,0x00000000,0x00040020,0x00000054,0x00000001,0x00000006,0x0004002b,
|
||||
0x00000019,0x00000058,0x00000001,0x00020014,0x0000005e,0x0004002b,0x00000006,0x00000075,
|
||||
0x00000001,0x0003001d,0x00000087,0x00000006,0x0003001e,0x00000088,0x00000087,0x00040020,
|
||||
0x00000089,0x00000002,0x00000088,0x0004003b,0x00000089,0x0000008a,0x00000002,0x0004002b,
|
||||
0x00000006,0x00000092,0x00000040,0x0006002c,0x00000050,0x00000093,0x00000092,0x00000075,
|
||||
0x00000075,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,0x00000005,
|
||||
0x0004003b,0x00000007,0x00000037,0x00000007,0x0004003b,0x00000007,0x00000044,0x00000007,
|
||||
0x0004003b,0x00000007,0x0000004b,0x00000007,0x0004003b,0x00000007,0x0000004f,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000063,0x00000007,0x0004003b,0x00000007,0x00000069,0x00000007,
|
||||
0x0004003b,0x00000007,0x0000006a,0x00000007,0x0004003b,0x00000007,0x0000006d,0x00000007,
|
||||
0x0004003b,0x00000007,0x0000006f,0x00000007,0x0004003b,0x00000007,0x00000070,0x00000007,
|
||||
0x0004003b,0x00000007,0x0000007b,0x00000007,0x0004003b,0x00000007,0x0000007e,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000080,0x00000007,0x0004003b,0x00000007,0x00000082,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000083,0x00000007,0x00050041,0x0000003f,0x00000040,0x0000003e,
|
||||
0x0000001a,0x0004003d,0x00000006,0x00000041,0x00000040,0x00060041,0x0000001e,0x00000042,
|
||||
0x0000003b,0x0000001a,0x00000041,0x0004003d,0x00000006,0x00000043,0x00000042,0x0003003e,
|
||||
0x00000037,0x00000043,0x00050041,0x0000003f,0x00000045,0x0000003e,0x0000001a,0x0004003d,
|
||||
0x00000006,0x00000046,0x00000045,0x00050080,0x00000006,0x00000048,0x00000046,0x00000047,
|
||||
0x00060041,0x0000001e,0x00000049,0x0000003b,0x0000001a,0x00000048,0x0004003d,0x00000006,
|
||||
0x0000004a,0x00000049,0x0003003e,0x00000044,0x0000004a,0x0004003d,0x00000006,0x0000004c,
|
||||
0x00000044,0x0004003d,0x00000006,0x0000004d,0x00000037,0x00050080,0x00000006,0x0000004e,
|
||||
0x0000004c,0x0000004d,0x0003003e,0x0000004b,0x0000004e,0x00050041,0x00000054,0x00000055,
|
||||
0x00000052,0x00000053,0x0004003d,0x00000006,0x00000056,0x00000055,0x0004003d,0x00000006,
|
||||
0x00000057,0x00000044,0x000500c2,0x00000006,0x00000059,0x00000057,0x00000058,0x00050080,
|
||||
0x00000006,0x0000005a,0x00000056,0x00000059,0x000500c4,0x00000006,0x0000005b,0x0000005a,
|
||||
0x00000058,0x0003003e,0x0000004f,0x0000005b,0x0004003d,0x00000006,0x0000005c,0x0000004f,
|
||||
0x0004003d,0x00000006,0x0000005d,0x0000004b,0x000500ae,0x0000005e,0x0000005f,0x0000005c,
|
||||
0x0000005d,0x000300f7,0x00000061,0x00000000,0x000400fa,0x0000005f,0x00000060,0x00000061,
|
||||
0x000200f8,0x00000060,0x000100fd,0x000200f8,0x00000061,0x0003003e,0x00000063,0x00000053,
|
||||
0x0004003d,0x00000006,0x00000064,0x0000004f,0x0004003d,0x00000006,0x00000065,0x00000044,
|
||||
0x000500ae,0x0000005e,0x00000066,0x00000064,0x00000065,0x000300f7,0x00000068,0x00000000,
|
||||
0x000400fa,0x00000066,0x00000067,0x00000068,0x000200f8,0x00000067,0x0004003d,0x00000006,
|
||||
0x0000006b,0x0000004f,0x0003003e,0x0000006a,0x0000006b,0x00050039,0x00000006,0x0000006c,
|
||||
0x0000000a,0x0000006a,0x0003003e,0x00000069,0x0000006c,0x0004003d,0x00000006,0x0000006e,
|
||||
0x00000069,0x0003003e,0x0000006d,0x0000006e,0x0003003e,0x0000006f,0x00000053,0x0004003d,
|
||||
0x00000006,0x00000071,0x00000063,0x0003003e,0x00000070,0x00000071,0x00070039,0x00000002,
|
||||
0x00000072,0x00000010,0x0000006d,0x0000006f,0x00000070,0x0004003d,0x00000006,0x00000073,
|
||||
0x00000070,0x0003003e,0x00000063,0x00000073,0x000200f9,0x00000068,0x000200f8,0x00000068,
|
||||
0x0004003d,0x00000006,0x00000074,0x0000004f,0x00050080,0x00000006,0x00000076,0x00000074,
|
||||
0x00000075,0x0004003d,0x00000006,0x00000077,0x0000004b,0x000500b0,0x0000005e,0x00000078,
|
||||
0x00000076,0x00000077,0x000300f7,0x0000007a,0x00000000,0x000400fa,0x00000078,0x00000079,
|
||||
0x0000007a,0x000200f8,0x00000079,0x0004003d,0x00000006,0x0000007c,0x0000004f,0x00050080,
|
||||
0x00000006,0x0000007d,0x0000007c,0x00000075,0x0003003e,0x0000007e,0x0000007d,0x00050039,
|
||||
0x00000006,0x0000007f,0x0000000a,0x0000007e,0x0003003e,0x0000007b,0x0000007f,0x0004003d,
|
||||
0x00000006,0x00000081,0x0000007b,0x0003003e,0x00000080,0x00000081,0x0003003e,0x00000082,
|
||||
0x00000075,0x0004003d,0x00000006,0x00000084,0x00000063,0x0003003e,0x00000083,0x00000084,
|
||||
0x00070039,0x00000002,0x00000085,0x00000010,0x00000080,0x00000082,0x00000083,0x0004003d,
|
||||
0x00000006,0x00000086,0x00000083,0x0003003e,0x00000063,0x00000086,0x000200f9,0x0000007a,
|
||||
0x000200f8,0x0000007a,0x00050041,0x0000003f,0x0000008b,0x0000003e,0x00000058,0x0004003d,
|
||||
0x00000006,0x0000008c,0x0000008b,0x00050041,0x00000054,0x0000008d,0x00000052,0x00000053,
|
||||
0x0004003d,0x00000006,0x0000008e,0x0000008d,0x00050080,0x00000006,0x0000008f,0x0000008c,
|
||||
0x0000008e,0x0004003d,0x00000006,0x00000090,0x00000063,0x00060041,0x0000001e,0x00000091,
|
||||
0x0000008a,0x0000001a,0x0000008f,0x0003003e,0x00000091,0x00000090,0x000100fd,0x00010038,
|
||||
0x00050036,0x00000006,0x0000000a,0x00000000,0x00000008,0x00030037,0x00000007,0x00000009,
|
||||
0x000200f8,0x0000000b,0x0004003b,0x00000007,0x00000012,0x00000007,0x0004003b,0x00000007,
|
||||
0x00000014,0x00000007,0x0004003b,0x00000007,0x00000021,0x00000007,0x0004003b,0x00000007,
|
||||
0x00000025,0x00000007,0x0004003d,0x00000006,0x00000013,0x00000009,0x0003003e,0x00000012,
|
||||
0x00000013,0x0004003d,0x00000006,0x0000001b,0x00000012,0x000500c2,0x00000006,0x0000001d,
|
||||
0x0000001b,0x0000001c,0x00060041,0x0000001e,0x0000001f,0x00000018,0x0000001a,0x0000001d,
|
||||
0x0004003d,0x00000006,0x00000020,0x0000001f,0x0003003e,0x00000014,0x00000020,0x0004003d,
|
||||
0x00000006,0x00000022,0x00000012,0x000500c7,0x00000006,0x00000024,0x00000022,0x00000023,
|
||||
0x0003003e,0x00000021,0x00000024,0x0004003d,0x00000006,0x00000026,0x00000014,0x0004003d,
|
||||
0x00000006,0x00000027,0x00000021,0x000500c4,0x00000006,0x00000029,0x00000027,0x00000028,
|
||||
0x000500c2,0x00000006,0x0000002a,0x00000026,0x00000029,0x000500c7,0x00000006,0x0000002c,
|
||||
0x0000002a,0x0000002b,0x0003003e,0x00000025,0x0000002c,0x0004003d,0x00000006,0x0000002d,
|
||||
0x00000025,0x000200fe,0x0000002d,0x00010038,0x00050036,0x00000002,0x00000010,0x00000000,
|
||||
0x0000000c,0x00030037,0x00000007,0x0000000d,0x00030037,0x00000007,0x0000000e,0x00030037,
|
||||
0x00000007,0x0000000f,0x000200f8,0x00000011,0x0004003d,0x00000006,0x00000030,0x0000000d,
|
||||
0x0004003d,0x00000006,0x00000031,0x0000000e,0x000500c4,0x00000006,0x00000033,0x00000031,
|
||||
0x00000032,0x000500c4,0x00000006,0x00000034,0x00000030,0x00000033,0x0004003d,0x00000006,
|
||||
0x00000035,0x0000000f,0x000500c5,0x00000006,0x00000036,0x00000035,0x00000034,0x0003003e,
|
||||
0x0000000f,0x00000036,0x000100fd,0x00010038
|
||||
};
|
||||
|
||||
// Generated from:
|
||||
//
|
||||
// #version 450 core
|
||||
//
|
||||
// layout(local_size_x = 64, local_size_y = 1, local_size_z = 1)in;
|
||||
//
|
||||
// layout(set = 0, binding = 0)buffer dst
|
||||
// {
|
||||
//
|
||||
// uint dstData[];
|
||||
// };
|
||||
//
|
||||
// layout(set = 0, binding = 1)readonly buffer src
|
||||
// {
|
||||
//
|
||||
// uint srcData[];
|
||||
// };
|
||||
//
|
||||
// layout(set = 0, binding = 2)readonly buffer cmd
|
||||
// {
|
||||
//
|
||||
// uint cmdData[];
|
||||
// };
|
||||
//
|
||||
// layout(push_constant)uniform PushConstants
|
||||
// {
|
||||
//
|
||||
// uint cmdOffsetDiv4;
|
||||
//
|
||||
// uint dstOffsetDiv4;
|
||||
//
|
||||
// uint maxIndex;
|
||||
//
|
||||
// uint _padding;
|
||||
// };
|
||||
//
|
||||
// uint PullIndex(uint index)
|
||||
// {
|
||||
//
|
||||
// uint srcIndex = index;
|
||||
//
|
||||
// uint srcBlock = srcData[srcIndex >> 2];
|
||||
// uint srcComponent =(srcIndex & 3);
|
||||
//
|
||||
// uint value =(srcBlock >>(srcComponent << 3))& 0xFF;
|
||||
//
|
||||
// return value;
|
||||
// }
|
||||
//
|
||||
// void PackIndexValue(uint srcValue, uint indexIndex, inout uint dstValue)
|
||||
// {
|
||||
//
|
||||
// dstValue |= srcValue <<(indexIndex << 4);
|
||||
// }
|
||||
//
|
||||
// void main()
|
||||
// {
|
||||
//
|
||||
// uint indexCount = cmdData[cmdOffsetDiv4];
|
||||
// uint firstIndex = cmdData[cmdOffsetDiv4 + 2];
|
||||
// uint endIndex = firstIndex + indexCount;
|
||||
//
|
||||
// uint index =((gl_GlobalInvocationID . x +(firstIndex >> 1))<< 1);
|
||||
//
|
||||
// if(index >= endIndex)
|
||||
// return;
|
||||
//
|
||||
// uint dstValue = 0;
|
||||
//
|
||||
// if(index >= firstIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index);
|
||||
// PackIndexValue(srcValue, 0, dstValue);
|
||||
// }
|
||||
//
|
||||
// if(index + 1 < endIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index + 1);
|
||||
// PackIndexValue(srcValue, 1, dstValue);
|
||||
// }
|
||||
//
|
||||
// dstData[dstOffsetDiv4 + gl_GlobalInvocationID . x]= dstValue;
|
||||
// }
|
|
@ -0,0 +1,223 @@
|
|||
// 7.12.3226
|
||||
#pragma once
|
||||
const uint32_t kConvertIndex_comp_00000003[] = {
|
||||
0x07230203,0x00010000,0x00080007,0x00000099,0x00000000,0x00020011,0x00000001,0x0006000b,
|
||||
0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
|
||||
0x0006000f,0x00000005,0x00000004,0x6e69616d,0x00000000,0x00000058,0x00060010,0x00000004,
|
||||
0x00000011,0x00000040,0x00000001,0x00000001,0x00030003,0x00000002,0x000001c2,0x00040005,
|
||||
0x00000004,0x6e69616d,0x00000000,0x00060005,0x0000000a,0x6c6c7550,0x65646e49,0x31752878,
|
||||
0x0000003b,0x00040005,0x00000009,0x65646e69,0x00000078,0x00090005,0x00000010,0x6b636150,
|
||||
0x65646e49,0x6c615678,0x75286575,0x31753b31,0x3b31753b,0x00000000,0x00050005,0x0000000d,
|
||||
0x56637273,0x65756c61,0x00000000,0x00050005,0x0000000e,0x65646e69,0x646e4978,0x00007865,
|
||||
0x00050005,0x0000000f,0x56747364,0x65756c61,0x00000000,0x00050005,0x00000012,0x49637273,
|
||||
0x7865646e,0x00000000,0x00050005,0x00000014,0x42637273,0x6b636f6c,0x00000000,0x00030005,
|
||||
0x00000016,0x00637273,0x00050006,0x00000016,0x00000000,0x44637273,0x00617461,0x00030005,
|
||||
0x00000018,0x00000000,0x00060005,0x00000021,0x43637273,0x6f706d6f,0x746e656e,0x00000000,
|
||||
0x00040005,0x00000025,0x756c6176,0x00000065,0x00050005,0x0000003d,0x65646e69,0x756f4378,
|
||||
0x0000746e,0x00030005,0x0000003f,0x00646d63,0x00050006,0x0000003f,0x00000000,0x44646d63,
|
||||
0x00617461,0x00030005,0x00000041,0x00000000,0x00060005,0x00000042,0x68737550,0x736e6f43,
|
||||
0x746e6174,0x00000073,0x00070006,0x00000042,0x00000000,0x4f646d63,0x65736666,0x76694474,
|
||||
0x00000034,0x00070006,0x00000042,0x00000001,0x4f747364,0x65736666,0x76694474,0x00000034,
|
||||
0x00060006,0x00000042,0x00000002,0x4978616d,0x7865646e,0x00000000,0x00060006,0x00000042,
|
||||
0x00000003,0x6461705f,0x676e6964,0x00000000,0x00030005,0x00000044,0x00000000,0x00050005,
|
||||
0x0000004a,0x73726966,0x646e4974,0x00007865,0x00050005,0x00000051,0x49646e65,0x7865646e,
|
||||
0x00000000,0x00040005,0x00000055,0x65646e69,0x00000078,0x00080005,0x00000058,0x475f6c67,
|
||||
0x61626f6c,0x766e496c,0x7461636f,0x496e6f69,0x00000044,0x00050005,0x00000068,0x56747364,
|
||||
0x65756c61,0x00000000,0x00050005,0x0000006e,0x56637273,0x65756c61,0x00000000,0x00040005,
|
||||
0x0000006f,0x61726170,0x0000006d,0x00040005,0x00000072,0x61726170,0x0000006d,0x00040005,
|
||||
0x00000074,0x61726170,0x0000006d,0x00040005,0x00000075,0x61726170,0x0000006d,0x00050005,
|
||||
0x00000080,0x56637273,0x65756c61,0x00000000,0x00040005,0x00000083,0x61726170,0x0000006d,
|
||||
0x00040005,0x00000085,0x61726170,0x0000006d,0x00040005,0x00000087,0x61726170,0x0000006d,
|
||||
0x00040005,0x00000088,0x61726170,0x0000006d,0x00030005,0x0000008d,0x00747364,0x00050006,
|
||||
0x0000008d,0x00000000,0x44747364,0x00617461,0x00030005,0x0000008f,0x00000000,0x00040047,
|
||||
0x00000015,0x00000006,0x00000004,0x00040048,0x00000016,0x00000000,0x00000018,0x00050048,
|
||||
0x00000016,0x00000000,0x00000023,0x00000000,0x00030047,0x00000016,0x00000003,0x00040047,
|
||||
0x00000018,0x00000022,0x00000000,0x00040047,0x00000018,0x00000021,0x00000001,0x00040047,
|
||||
0x0000003e,0x00000006,0x00000004,0x00040048,0x0000003f,0x00000000,0x00000018,0x00050048,
|
||||
0x0000003f,0x00000000,0x00000023,0x00000000,0x00030047,0x0000003f,0x00000003,0x00040047,
|
||||
0x00000041,0x00000022,0x00000000,0x00040047,0x00000041,0x00000021,0x00000002,0x00050048,
|
||||
0x00000042,0x00000000,0x00000023,0x00000000,0x00050048,0x00000042,0x00000001,0x00000023,
|
||||
0x00000004,0x00050048,0x00000042,0x00000002,0x00000023,0x00000008,0x00050048,0x00000042,
|
||||
0x00000003,0x00000023,0x0000000c,0x00030047,0x00000042,0x00000002,0x00040047,0x00000058,
|
||||
0x0000000b,0x0000001c,0x00040047,0x0000008c,0x00000006,0x00000004,0x00050048,0x0000008d,
|
||||
0x00000000,0x00000023,0x00000000,0x00030047,0x0000008d,0x00000003,0x00040047,0x0000008f,
|
||||
0x00000022,0x00000000,0x00040047,0x0000008f,0x00000021,0x00000000,0x00040047,0x00000098,
|
||||
0x0000000b,0x00000019,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00040015,
|
||||
0x00000006,0x00000020,0x00000000,0x00040020,0x00000007,0x00000007,0x00000006,0x00040021,
|
||||
0x00000008,0x00000006,0x00000007,0x00060021,0x0000000c,0x00000002,0x00000007,0x00000007,
|
||||
0x00000007,0x0003001d,0x00000015,0x00000006,0x0003001e,0x00000016,0x00000015,0x00040020,
|
||||
0x00000017,0x00000002,0x00000016,0x0004003b,0x00000017,0x00000018,0x00000002,0x00040015,
|
||||
0x00000019,0x00000020,0x00000001,0x0004002b,0x00000019,0x0000001a,0x00000000,0x0004002b,
|
||||
0x00000019,0x0000001c,0x00000002,0x00040020,0x0000001e,0x00000002,0x00000006,0x0004002b,
|
||||
0x00000006,0x00000023,0x00000003,0x0004002b,0x00000019,0x00000028,0x00000003,0x0004002b,
|
||||
0x00000006,0x0000002b,0x000000ff,0x00020014,0x0000002e,0x0004002b,0x00000006,0x00000032,
|
||||
0x0000ffff,0x0004002b,0x00000019,0x00000038,0x00000004,0x0003001d,0x0000003e,0x00000006,
|
||||
0x0003001e,0x0000003f,0x0000003e,0x00040020,0x00000040,0x00000002,0x0000003f,0x0004003b,
|
||||
0x00000040,0x00000041,0x00000002,0x0006001e,0x00000042,0x00000006,0x00000006,0x00000006,
|
||||
0x00000006,0x00040020,0x00000043,0x00000009,0x00000042,0x0004003b,0x00000043,0x00000044,
|
||||
0x00000009,0x00040020,0x00000045,0x00000009,0x00000006,0x0004002b,0x00000006,0x0000004d,
|
||||
0x00000002,0x00040017,0x00000056,0x00000006,0x00000003,0x00040020,0x00000057,0x00000001,
|
||||
0x00000056,0x0004003b,0x00000057,0x00000058,0x00000001,0x0004002b,0x00000006,0x00000059,
|
||||
0x00000000,0x00040020,0x0000005a,0x00000001,0x00000006,0x0004002b,0x00000019,0x0000005e,
|
||||
0x00000001,0x0004002b,0x00000006,0x0000007a,0x00000001,0x0003001d,0x0000008c,0x00000006,
|
||||
0x0003001e,0x0000008d,0x0000008c,0x00040020,0x0000008e,0x00000002,0x0000008d,0x0004003b,
|
||||
0x0000008e,0x0000008f,0x00000002,0x0004002b,0x00000006,0x00000097,0x00000040,0x0006002c,
|
||||
0x00000056,0x00000098,0x00000097,0x0000007a,0x0000007a,0x00050036,0x00000002,0x00000004,
|
||||
0x00000000,0x00000003,0x000200f8,0x00000005,0x0004003b,0x00000007,0x0000003d,0x00000007,
|
||||
0x0004003b,0x00000007,0x0000004a,0x00000007,0x0004003b,0x00000007,0x00000051,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000055,0x00000007,0x0004003b,0x00000007,0x00000068,0x00000007,
|
||||
0x0004003b,0x00000007,0x0000006e,0x00000007,0x0004003b,0x00000007,0x0000006f,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000072,0x00000007,0x0004003b,0x00000007,0x00000074,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000075,0x00000007,0x0004003b,0x00000007,0x00000080,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000083,0x00000007,0x0004003b,0x00000007,0x00000085,0x00000007,
|
||||
0x0004003b,0x00000007,0x00000087,0x00000007,0x0004003b,0x00000007,0x00000088,0x00000007,
|
||||
0x00050041,0x00000045,0x00000046,0x00000044,0x0000001a,0x0004003d,0x00000006,0x00000047,
|
||||
0x00000046,0x00060041,0x0000001e,0x00000048,0x00000041,0x0000001a,0x00000047,0x0004003d,
|
||||
0x00000006,0x00000049,0x00000048,0x0003003e,0x0000003d,0x00000049,0x00050041,0x00000045,
|
||||
0x0000004b,0x00000044,0x0000001a,0x0004003d,0x00000006,0x0000004c,0x0000004b,0x00050080,
|
||||
0x00000006,0x0000004e,0x0000004c,0x0000004d,0x00060041,0x0000001e,0x0000004f,0x00000041,
|
||||
0x0000001a,0x0000004e,0x0004003d,0x00000006,0x00000050,0x0000004f,0x0003003e,0x0000004a,
|
||||
0x00000050,0x0004003d,0x00000006,0x00000052,0x0000004a,0x0004003d,0x00000006,0x00000053,
|
||||
0x0000003d,0x00050080,0x00000006,0x00000054,0x00000052,0x00000053,0x0003003e,0x00000051,
|
||||
0x00000054,0x00050041,0x0000005a,0x0000005b,0x00000058,0x00000059,0x0004003d,0x00000006,
|
||||
0x0000005c,0x0000005b,0x0004003d,0x00000006,0x0000005d,0x0000004a,0x000500c2,0x00000006,
|
||||
0x0000005f,0x0000005d,0x0000005e,0x00050080,0x00000006,0x00000060,0x0000005c,0x0000005f,
|
||||
0x000500c4,0x00000006,0x00000061,0x00000060,0x0000005e,0x0003003e,0x00000055,0x00000061,
|
||||
0x0004003d,0x00000006,0x00000062,0x00000055,0x0004003d,0x00000006,0x00000063,0x00000051,
|
||||
0x000500ae,0x0000002e,0x00000064,0x00000062,0x00000063,0x000300f7,0x00000066,0x00000000,
|
||||
0x000400fa,0x00000064,0x00000065,0x00000066,0x000200f8,0x00000065,0x000100fd,0x000200f8,
|
||||
0x00000066,0x0003003e,0x00000068,0x00000059,0x0004003d,0x00000006,0x00000069,0x00000055,
|
||||
0x0004003d,0x00000006,0x0000006a,0x0000004a,0x000500ae,0x0000002e,0x0000006b,0x00000069,
|
||||
0x0000006a,0x000300f7,0x0000006d,0x00000000,0x000400fa,0x0000006b,0x0000006c,0x0000006d,
|
||||
0x000200f8,0x0000006c,0x0004003d,0x00000006,0x00000070,0x00000055,0x0003003e,0x0000006f,
|
||||
0x00000070,0x00050039,0x00000006,0x00000071,0x0000000a,0x0000006f,0x0003003e,0x0000006e,
|
||||
0x00000071,0x0004003d,0x00000006,0x00000073,0x0000006e,0x0003003e,0x00000072,0x00000073,
|
||||
0x0003003e,0x00000074,0x00000059,0x0004003d,0x00000006,0x00000076,0x00000068,0x0003003e,
|
||||
0x00000075,0x00000076,0x00070039,0x00000002,0x00000077,0x00000010,0x00000072,0x00000074,
|
||||
0x00000075,0x0004003d,0x00000006,0x00000078,0x00000075,0x0003003e,0x00000068,0x00000078,
|
||||
0x000200f9,0x0000006d,0x000200f8,0x0000006d,0x0004003d,0x00000006,0x00000079,0x00000055,
|
||||
0x00050080,0x00000006,0x0000007b,0x00000079,0x0000007a,0x0004003d,0x00000006,0x0000007c,
|
||||
0x00000051,0x000500b0,0x0000002e,0x0000007d,0x0000007b,0x0000007c,0x000300f7,0x0000007f,
|
||||
0x00000000,0x000400fa,0x0000007d,0x0000007e,0x0000007f,0x000200f8,0x0000007e,0x0004003d,
|
||||
0x00000006,0x00000081,0x00000055,0x00050080,0x00000006,0x00000082,0x00000081,0x0000007a,
|
||||
0x0003003e,0x00000083,0x00000082,0x00050039,0x00000006,0x00000084,0x0000000a,0x00000083,
|
||||
0x0003003e,0x00000080,0x00000084,0x0004003d,0x00000006,0x00000086,0x00000080,0x0003003e,
|
||||
0x00000085,0x00000086,0x0003003e,0x00000087,0x0000007a,0x0004003d,0x00000006,0x00000089,
|
||||
0x00000068,0x0003003e,0x00000088,0x00000089,0x00070039,0x00000002,0x0000008a,0x00000010,
|
||||
0x00000085,0x00000087,0x00000088,0x0004003d,0x00000006,0x0000008b,0x00000088,0x0003003e,
|
||||
0x00000068,0x0000008b,0x000200f9,0x0000007f,0x000200f8,0x0000007f,0x00050041,0x00000045,
|
||||
0x00000090,0x00000044,0x0000005e,0x0004003d,0x00000006,0x00000091,0x00000090,0x00050041,
|
||||
0x0000005a,0x00000092,0x00000058,0x00000059,0x0004003d,0x00000006,0x00000093,0x00000092,
|
||||
0x00050080,0x00000006,0x00000094,0x00000091,0x00000093,0x0004003d,0x00000006,0x00000095,
|
||||
0x00000068,0x00060041,0x0000001e,0x00000096,0x0000008f,0x0000001a,0x00000094,0x0003003e,
|
||||
0x00000096,0x00000095,0x000100fd,0x00010038,0x00050036,0x00000006,0x0000000a,0x00000000,
|
||||
0x00000008,0x00030037,0x00000007,0x00000009,0x000200f8,0x0000000b,0x0004003b,0x00000007,
|
||||
0x00000012,0x00000007,0x0004003b,0x00000007,0x00000014,0x00000007,0x0004003b,0x00000007,
|
||||
0x00000021,0x00000007,0x0004003b,0x00000007,0x00000025,0x00000007,0x0004003d,0x00000006,
|
||||
0x00000013,0x00000009,0x0003003e,0x00000012,0x00000013,0x0004003d,0x00000006,0x0000001b,
|
||||
0x00000012,0x000500c2,0x00000006,0x0000001d,0x0000001b,0x0000001c,0x00060041,0x0000001e,
|
||||
0x0000001f,0x00000018,0x0000001a,0x0000001d,0x0004003d,0x00000006,0x00000020,0x0000001f,
|
||||
0x0003003e,0x00000014,0x00000020,0x0004003d,0x00000006,0x00000022,0x00000012,0x000500c7,
|
||||
0x00000006,0x00000024,0x00000022,0x00000023,0x0003003e,0x00000021,0x00000024,0x0004003d,
|
||||
0x00000006,0x00000026,0x00000014,0x0004003d,0x00000006,0x00000027,0x00000021,0x000500c4,
|
||||
0x00000006,0x00000029,0x00000027,0x00000028,0x000500c2,0x00000006,0x0000002a,0x00000026,
|
||||
0x00000029,0x000500c7,0x00000006,0x0000002c,0x0000002a,0x0000002b,0x0003003e,0x00000025,
|
||||
0x0000002c,0x0004003d,0x00000006,0x0000002d,0x00000025,0x000500aa,0x0000002e,0x0000002f,
|
||||
0x0000002d,0x0000002b,0x000300f7,0x00000031,0x00000000,0x000400fa,0x0000002f,0x00000030,
|
||||
0x00000031,0x000200f8,0x00000030,0x0003003e,0x00000025,0x00000032,0x000200f9,0x00000031,
|
||||
0x000200f8,0x00000031,0x0004003d,0x00000006,0x00000033,0x00000025,0x000200fe,0x00000033,
|
||||
0x00010038,0x00050036,0x00000002,0x00000010,0x00000000,0x0000000c,0x00030037,0x00000007,
|
||||
0x0000000d,0x00030037,0x00000007,0x0000000e,0x00030037,0x00000007,0x0000000f,0x000200f8,
|
||||
0x00000011,0x0004003d,0x00000006,0x00000036,0x0000000d,0x0004003d,0x00000006,0x00000037,
|
||||
0x0000000e,0x000500c4,0x00000006,0x00000039,0x00000037,0x00000038,0x000500c4,0x00000006,
|
||||
0x0000003a,0x00000036,0x00000039,0x0004003d,0x00000006,0x0000003b,0x0000000f,0x000500c5,
|
||||
0x00000006,0x0000003c,0x0000003b,0x0000003a,0x0003003e,0x0000000f,0x0000003c,0x000100fd,
|
||||
0x00010038
|
||||
};
|
||||
|
||||
// Generated from:
|
||||
//
|
||||
// #version 450 core
|
||||
//
|
||||
// layout(local_size_x = 64, local_size_y = 1, local_size_z = 1)in;
|
||||
//
|
||||
// layout(set = 0, binding = 0)buffer dst
|
||||
// {
|
||||
//
|
||||
// uint dstData[];
|
||||
// };
|
||||
//
|
||||
// layout(set = 0, binding = 1)readonly buffer src
|
||||
// {
|
||||
//
|
||||
// uint srcData[];
|
||||
// };
|
||||
//
|
||||
// layout(set = 0, binding = 2)readonly buffer cmd
|
||||
// {
|
||||
//
|
||||
// uint cmdData[];
|
||||
// };
|
||||
//
|
||||
// layout(push_constant)uniform PushConstants
|
||||
// {
|
||||
//
|
||||
// uint cmdOffsetDiv4;
|
||||
//
|
||||
// uint dstOffsetDiv4;
|
||||
//
|
||||
// uint maxIndex;
|
||||
//
|
||||
// uint _padding;
|
||||
// };
|
||||
//
|
||||
// uint PullIndex(uint index)
|
||||
// {
|
||||
//
|
||||
// uint srcIndex = index;
|
||||
//
|
||||
// uint srcBlock = srcData[srcIndex >> 2];
|
||||
// uint srcComponent =(srcIndex & 3);
|
||||
//
|
||||
// uint value =(srcBlock >>(srcComponent << 3))& 0xFF;
|
||||
//
|
||||
// if(value == 0xFF)
|
||||
// value = 0xFFFF;
|
||||
//
|
||||
// return value;
|
||||
// }
|
||||
//
|
||||
// void PackIndexValue(uint srcValue, uint indexIndex, inout uint dstValue)
|
||||
// {
|
||||
//
|
||||
// dstValue |= srcValue <<(indexIndex << 4);
|
||||
// }
|
||||
//
|
||||
// void main()
|
||||
// {
|
||||
//
|
||||
// uint indexCount = cmdData[cmdOffsetDiv4];
|
||||
// uint firstIndex = cmdData[cmdOffsetDiv4 + 2];
|
||||
// uint endIndex = firstIndex + indexCount;
|
||||
//
|
||||
// uint index =((gl_GlobalInvocationID . x +(firstIndex >> 1))<< 1);
|
||||
//
|
||||
// if(index >= endIndex)
|
||||
// return;
|
||||
//
|
||||
// uint dstValue = 0;
|
||||
//
|
||||
// if(index >= firstIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index);
|
||||
// PackIndexValue(srcValue, 0, dstValue);
|
||||
// }
|
||||
//
|
||||
// if(index + 1 < endIndex)
|
||||
// {
|
||||
// uint srcValue = PullIndex(index + 1);
|
||||
// PackIndexValue(srcValue, 1, dstValue);
|
||||
// }
|
||||
//
|
||||
// dstData[dstOffsetDiv4 + gl_GlobalInvocationID . x]= dstValue;
|
||||
// }
|
|
@ -10,6 +10,7 @@
|
|||
// - Flags:
|
||||
// * IsPrimitiveRestartEnabled: enables conversion from 0xFF to 0xFFFF,
|
||||
// the restart indices for 8-bit and 16-bit indices.
|
||||
// * IsIndirect: Use indirect buffer for index info
|
||||
//
|
||||
|
||||
#version 450 core
|
||||
|
@ -28,6 +29,28 @@ layout (set = 0, binding = 1) readonly buffer src
|
|||
uint srcData[];
|
||||
};
|
||||
|
||||
#if IsIndirect
|
||||
layout (set = 0, binding = 2) readonly buffer cmd
|
||||
{
|
||||
// Shader invocations read from the cmdData buffer to determine what indices to convert
|
||||
// The command data starts at offset cmdOffsetDiv4 of the cmdData buffer.
|
||||
uint cmdData[];
|
||||
};
|
||||
|
||||
layout (push_constant) uniform PushConstants
|
||||
{
|
||||
// Read offset in bytes into the cmdData array, divided by four.
|
||||
uint cmdOffsetDiv4;
|
||||
// Write offset in bytes into the dstData array, divided by four.
|
||||
uint dstOffsetDiv4;
|
||||
// Maximum size of the read buffer. The highest index value we will convert.
|
||||
uint maxIndex;
|
||||
// Not used in the shader. Kept to pad "PushConstants" to the size of a vec4.
|
||||
uint _padding;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
layout (push_constant) uniform PushConstants
|
||||
{
|
||||
// Read offset in bytes into the srcData array.
|
||||
|
@ -39,10 +62,15 @@ layout (push_constant) uniform PushConstants
|
|||
// Not used in the shader. Kept to pad "PushConstants" to the size of a vec4.
|
||||
uint _padding;
|
||||
};
|
||||
#endif
|
||||
|
||||
uint PullIndex(uint index)
|
||||
{
|
||||
#if IsIndirect
|
||||
uint srcIndex = index;
|
||||
#else
|
||||
uint srcIndex = index + srcOffset;
|
||||
#endif
|
||||
uint srcBlock = srcData[srcIndex >> 2];
|
||||
uint srcComponent = (srcIndex & 3);
|
||||
|
||||
|
@ -64,21 +92,37 @@ void PackIndexValue(uint srcValue, uint indexIndex, inout uint dstValue)
|
|||
|
||||
void main()
|
||||
{
|
||||
// The element index is simply the invocation ID times two.
|
||||
uint index = (gl_GlobalInvocationID.x << 1);
|
||||
#if IsIndirect
|
||||
uint indexCount = cmdData[cmdOffsetDiv4];
|
||||
uint firstIndex = cmdData[cmdOffsetDiv4 + 2];
|
||||
uint endIndex = firstIndex + indexCount;
|
||||
#else
|
||||
uint firstIndex = 0;
|
||||
uint endIndex = firstIndex + maxIndex;
|
||||
#endif
|
||||
|
||||
// The element index is invocation ID times two plus
|
||||
// the firstIndex / 2.
|
||||
// This way the first indexCount/2 invocations will transform
|
||||
// the data and any additional invocations will be a no-op
|
||||
uint index = ((gl_GlobalInvocationID.x + (firstIndex >> 1)) << 1);
|
||||
|
||||
// Don't write anything to dest if we're entirely past the end of the buffer.
|
||||
// We assume buffer size is uint-aligned.
|
||||
if (index >= maxIndex)
|
||||
if (index >= endIndex)
|
||||
return;
|
||||
|
||||
uint dstValue = 0;
|
||||
|
||||
uint srcValue = PullIndex(index);
|
||||
PackIndexValue(srcValue, 0, dstValue);
|
||||
// Skip packing the first index if we're before the first element.
|
||||
if (index >= firstIndex)
|
||||
{
|
||||
uint srcValue = PullIndex(index);
|
||||
PackIndexValue(srcValue, 0, dstValue);
|
||||
}
|
||||
|
||||
// Skip packing the second index if we're after the last element.
|
||||
if (index + 1 < maxIndex)
|
||||
if (index + 1 < endIndex)
|
||||
{
|
||||
uint srcValue = PullIndex(index + 1);
|
||||
PackIndexValue(srcValue, 1, dstValue);
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"ConvertIndex.comp.json: Build parameters for ConvertIndex.comp."
|
||||
],
|
||||
"Flags": [
|
||||
"IsPrimitiveRestartEnabled"
|
||||
"IsPrimitiveRestartEnabled",
|
||||
"IsIndirect"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -58,6 +58,8 @@ namespace
|
|||
#include "libANGLE/renderer/vulkan/shaders/gen/BufferUtils.comp.0000000B.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000000.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000001.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000002.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000003.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000000.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000001.inc"
|
||||
#include "libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000002.inc"
|
||||
|
@ -210,6 +212,8 @@ constexpr ShaderBlob kBufferUtils_comp_shaders[] = {
|
|||
constexpr ShaderBlob kConvertIndex_comp_shaders[] = {
|
||||
{kConvertIndex_comp_00000000, sizeof(kConvertIndex_comp_00000000)},
|
||||
{kConvertIndex_comp_00000001, sizeof(kConvertIndex_comp_00000001)},
|
||||
{kConvertIndex_comp_00000002, sizeof(kConvertIndex_comp_00000002)},
|
||||
{kConvertIndex_comp_00000003, sizeof(kConvertIndex_comp_00000003)},
|
||||
};
|
||||
constexpr ShaderBlob kConvertVertex_comp_shaders[] = {
|
||||
{kConvertVertex_comp_00000000, sizeof(kConvertVertex_comp_00000000)},
|
||||
|
|
|
@ -51,6 +51,8 @@ angle_vulkan_internal_shaders = [
|
|||
"src/libANGLE/renderer/vulkan/shaders/gen/BufferUtils.comp.0000000B.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000000.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000001.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000002.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertIndex.comp.00000003.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000000.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000001.inc",
|
||||
"src/libANGLE/renderer/vulkan/shaders/gen/ConvertVertex.comp.00000002.inc",
|
||||
|
|
|
@ -73,8 +73,9 @@ namespace ConvertIndex_comp
|
|||
enum flags
|
||||
{
|
||||
kIsPrimitiveRestartEnabled = 0x00000001,
|
||||
kIsIndirect = 0x00000002,
|
||||
};
|
||||
constexpr size_t kArrayLen = 0x00000002;
|
||||
constexpr size_t kArrayLen = 0x00000004;
|
||||
} // namespace ConvertIndex_comp
|
||||
|
||||
namespace ConvertVertex_comp
|
||||
|
|
|
@ -277,6 +277,10 @@ class CommandBuffer : public WrappedObject<CommandBuffer, VkCommandBuffer>
|
|||
uint32_t firstIndex,
|
||||
int32_t vertexOffset,
|
||||
uint32_t firstInstance);
|
||||
void drawIndexedIndirect(const Buffer &buffer,
|
||||
VkDeviceSize offset,
|
||||
uint32_t drawCount,
|
||||
uint32_t stride);
|
||||
|
||||
VkResult end();
|
||||
void endQuery(VkQueryPool queryPool, uint32_t query);
|
||||
|
@ -966,6 +970,15 @@ ANGLE_INLINE void CommandBuffer::drawIndexedInstancedBaseVertexBaseInstance(uint
|
|||
vkCmdDrawIndexed(mHandle, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance);
|
||||
}
|
||||
|
||||
ANGLE_INLINE void CommandBuffer::drawIndexedIndirect(const Buffer &buffer,
|
||||
VkDeviceSize offset,
|
||||
uint32_t drawCount,
|
||||
uint32_t stride)
|
||||
{
|
||||
ASSERT(valid());
|
||||
vkCmdDrawIndexedIndirect(mHandle, buffer.getHandle(), offset, drawCount, stride);
|
||||
}
|
||||
|
||||
ANGLE_INLINE void CommandBuffer::dispatch(uint32_t groupCountX,
|
||||
uint32_t groupCountY,
|
||||
uint32_t groupCountZ)
|
||||
|
|
|
@ -635,11 +635,7 @@
|
|||
|
||||
// Indirect draw:
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.draw_arrays_indirect.line_loop.* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.instancing.draw_elements* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.compute_interop.separate.drawelements* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.compute_interop.combined.drawelements* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.compute_interop.large.drawelements* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.draw_elements_indirect.line_loop.* = SKIP
|
||||
3564 VULKAN : dEQP-GLES31.functional.draw_indirect.random.* = SKIP
|
||||
|
||||
// Tessellation geometry interaction:
|
||||
|
|
Загрузка…
Ссылка в новой задаче