Cleanup: format
This commit is contained in:
@@ -116,10 +116,10 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata)
|
||||
const bool show_modified_uvs = sima->flag & SI_DRAWSHADOW;
|
||||
const bool is_tiled_image = image && (image->source == IMA_SRC_TILED);
|
||||
const bool do_edges_only = (ts->uv_flag & UV_SYNC_SELECTION) ?
|
||||
/* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge
|
||||
* on the mesh may cause single UV vertices to be selected. */
|
||||
false :
|
||||
(ts->uv_selectmode == UV_SELECT_EDGE);
|
||||
/* NOTE: Ignore #SCE_SELECT_EDGE because a single selected edge
|
||||
* on the mesh may cause single UV vertices to be selected. */
|
||||
false :
|
||||
(ts->uv_selectmode == UV_SELECT_EDGE);
|
||||
const bool do_faces = ((sima->flag & SI_NO_DRAWFACES) == 0);
|
||||
const bool do_face_dots = (ts->uv_flag & UV_SYNC_SELECTION) ?
|
||||
(ts->selectmode & SCE_SELECT_FACE) != 0 :
|
||||
|
@@ -58,9 +58,9 @@ void main()
|
||||
/* Base index of the line primitive:
|
||||
* IF PrimType == LineList: base_vertex_id = quad_id*2
|
||||
* IF PrimType == LineStrip: base_vertex_id = quad_id
|
||||
*
|
||||
*
|
||||
* Note: This is currently used as LineList.
|
||||
*
|
||||
*
|
||||
* Note: Primitive Restart Will not work with this setup as-is. We should avoid using
|
||||
* input primitive types which use restart indices. */
|
||||
int base_vertex_id = quad_id * 2;
|
||||
|
@@ -16,24 +16,23 @@
|
||||
namespace blender {
|
||||
namespace gpu {
|
||||
|
||||
|
||||
/* Pass-through MTLBatch. TODO(Metal): Implement. */
|
||||
class MTLBatch : public Batch {
|
||||
public:
|
||||
void draw(int v_first, int v_count, int i_first, int i_count) override {
|
||||
|
||||
void draw(int v_first, int v_count, int i_first, int i_count) override
|
||||
{
|
||||
}
|
||||
|
||||
void draw_indirect(GPUStorageBuf *indirect_buf, intptr_t offset) override {
|
||||
|
||||
void draw_indirect(GPUStorageBuf *indirect_buf, intptr_t offset) override
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void multi_draw_indirect(GPUStorageBuf *indirect_buf,
|
||||
int count,
|
||||
intptr_t offset,
|
||||
intptr_t stride) override {
|
||||
|
||||
}
|
||||
intptr_t stride) override
|
||||
{
|
||||
}
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("MTLBatch");
|
||||
};
|
||||
|
||||
|
@@ -21,11 +21,19 @@ namespace gpu {
|
||||
*/
|
||||
class MTLDrawList : public DrawList {
|
||||
public:
|
||||
MTLDrawList(int length) {}
|
||||
~MTLDrawList() {}
|
||||
MTLDrawList(int length)
|
||||
{
|
||||
}
|
||||
~MTLDrawList()
|
||||
{
|
||||
}
|
||||
|
||||
void append(GPUBatch *batch, int i_first, int i_count) override {}
|
||||
void submit() override {}
|
||||
void append(GPUBatch *batch, int i_first, int i_count) override
|
||||
{
|
||||
}
|
||||
void submit() override
|
||||
{
|
||||
}
|
||||
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("MTLDrawList");
|
||||
};
|
||||
|
@@ -6,7 +6,6 @@
|
||||
* Mimics old style opengl immediate mode drawing.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
@@ -115,7 +115,8 @@ void MTLImmediate::end()
|
||||
|
||||
/* Disable Indexed rendering in SSBO vertex fetch. */
|
||||
int uniform_ssbo_use_indexed = active_mtl_shader->uni_ssbo_uses_indexed_rendering;
|
||||
BLI_assert_msg(uniform_ssbo_use_indexed != -1, "Expected valid uniform location for ssbo_uses_indexed_rendering.");
|
||||
BLI_assert_msg(uniform_ssbo_use_indexed != -1,
|
||||
"Expected valid uniform location for ssbo_uses_indexed_rendering.");
|
||||
int uses_indexed_rendering = 0;
|
||||
active_mtl_shader->uniform_int(uniform_ssbo_use_indexed, 1, 1, &uses_indexed_rendering);
|
||||
}
|
||||
@@ -206,7 +207,7 @@ void MTLImmediate::end()
|
||||
/* SSBO Vertex Fetch Attribute bind. */
|
||||
if (active_mtl_shader->get_uses_ssbo_vertex_fetch()) {
|
||||
BLI_assert_msg(mtl_shader_attribute.buffer_index == 0,
|
||||
"All attributes should be in buffer index zero");
|
||||
"All attributes should be in buffer index zero");
|
||||
MTLSSBOAttribute ssbo_attr(
|
||||
mtl_shader_attribute.index,
|
||||
mtl_shader_attribute.buffer_index,
|
||||
|
Reference in New Issue
Block a user