Vulkan: Fix Issues surrounding Grease Pencil Drawing
Some minor tweaks to the vulkan backend to support grease pencil drawing. The changes include: * Add support for GPU_DATA_10_11_11_REV clearing * Use correct index buffer start and count Anti aliasing isn't working as they require different samplers being configured and that require some design work. Effects haven't been tested. Pull Request: https://projects.blender.org/blender/blender/pulls/114659
This commit is contained in:
parent
c3609ec435
commit
b51027ea0c
|
@ -51,10 +51,10 @@ void VKBatch::draw(int vertex_first, int vertex_count, int instance_first, int i
|
|||
VKIndexBuffer *index_buffer = index_buffer_get();
|
||||
const bool draw_indexed = index_buffer != nullptr;
|
||||
if (draw_indexed) {
|
||||
command_buffers.draw_indexed(index_buffer->index_len_get(),
|
||||
command_buffers.draw_indexed(vertex_count,
|
||||
instance_count,
|
||||
index_buffer->index_start_get(),
|
||||
vertex_first,
|
||||
index_buffer->index_start_get(),
|
||||
instance_first);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -763,7 +763,8 @@ VkClearColorValue to_vk_clear_color_value(const eGPUDataFormat format, const voi
|
|||
{
|
||||
VkClearColorValue result = {{0.0f}};
|
||||
switch (format) {
|
||||
case GPU_DATA_FLOAT: {
|
||||
case GPU_DATA_FLOAT:
|
||||
case GPU_DATA_10_11_11_REV: {
|
||||
const float *float_data = static_cast<const float *>(data);
|
||||
copy_color<float>(result.float32, float_data);
|
||||
break;
|
||||
|
@ -784,7 +785,6 @@ VkClearColorValue to_vk_clear_color_value(const eGPUDataFormat format, const voi
|
|||
case GPU_DATA_HALF_FLOAT:
|
||||
case GPU_DATA_UBYTE:
|
||||
case GPU_DATA_UINT_24_8:
|
||||
case GPU_DATA_10_11_11_REV:
|
||||
case GPU_DATA_2_10_10_10_REV: {
|
||||
BLI_assert_unreachable();
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue