Cleanup: clang-format

This commit is contained in:
Campbell Barton
2022-04-20 09:13:48 +10:00
parent f8f8edbe1a
commit 42717596d0
8 changed files with 26 additions and 23 deletions

View File

@@ -496,7 +496,7 @@ void ObjectManager::device_update_object_transform(UpdateObjectTransformState *s
kobject.dupli_generated[2] = ob->dupli_generated[2]; kobject.dupli_generated[2] = ob->dupli_generated[2];
kobject.numkeys = (geom->geometry_type == Geometry::HAIR) ? kobject.numkeys = (geom->geometry_type == Geometry::HAIR) ?
static_cast<Hair *>(geom)->get_curve_keys().size() : static_cast<Hair *>(geom)->get_curve_keys().size() :
(geom->geometry_type == Geometry::POINTCLOUD) ? (geom->geometry_type == Geometry::POINTCLOUD) ?
static_cast<PointCloud *>(geom)->num_points() : static_cast<PointCloud *>(geom)->num_points() :
0; 0;
kobject.dupli_uv[0] = ob->dupli_uv[0]; kobject.dupli_uv[0] = ob->dupli_uv[0];

View File

@@ -116,7 +116,11 @@ GHOST_Wintab *GHOST_Wintab::loadWintab(HWND hwnd)
} }
int sanityQueueSize = queueSizeGet(hctx.get()); int sanityQueueSize = queueSizeGet(hctx.get());
WINTAB_PRINTF("HCTX %p %s queueSize: %d, queueSizeGet: %d\n", hctx.get(), __func__, queueSize, sanityQueueSize); WINTAB_PRINTF("HCTX %p %s queueSize: %d, queueSizeGet: %d\n",
hctx.get(),
__func__,
queueSize,
sanityQueueSize);
WINTAB_PRINTF("Loaded Wintab context %p\n", hctx.get()); WINTAB_PRINTF("Loaded Wintab context %p\n", hctx.get());
@@ -274,7 +278,11 @@ void GHOST_Wintab::updateCursorInfo()
else { else {
m_maxAzimuth = m_maxAltitude = 0; m_maxAzimuth = m_maxAltitude = 0;
} }
WINTAB_PRINTF("HCTX %p %s maxAzimuth: %d, maxAltitude: %d\n", m_context.get(), __func__, m_maxAzimuth, m_maxAltitude); WINTAB_PRINTF("HCTX %p %s maxAzimuth: %d, maxAltitude: %d\n",
m_context.get(),
__func__,
m_maxAzimuth,
m_maxAltitude);
} }
void GHOST_Wintab::processInfoChange(LPARAM lParam) void GHOST_Wintab::processInfoChange(LPARAM lParam)
@@ -531,10 +539,10 @@ void GHOST_Wintab::printContextDebugInfo()
/* Print system information. */ /* Print system information. */
printf("left: %d, top: %d, width: %d, height: %d\n", printf("left: %d, top: %d, width: %d, height: %d\n",
::GetSystemMetrics(SM_XVIRTUALSCREEN), ::GetSystemMetrics(SM_XVIRTUALSCREEN),
::GetSystemMetrics(SM_YVIRTUALSCREEN), ::GetSystemMetrics(SM_YVIRTUALSCREEN),
::GetSystemMetrics(SM_CXVIRTUALSCREEN), ::GetSystemMetrics(SM_CXVIRTUALSCREEN),
::GetSystemMetrics(SM_CYVIRTUALSCREEN)); ::GetSystemMetrics(SM_CYVIRTUALSCREEN));
auto printContextRanges = [](LOGCONTEXT &lc) { auto printContextRanges = [](LOGCONTEXT &lc) {
printf("lcInOrgX: %d, lcInOrgY: %d, lcInExtX: %d, lcInExtY: %d\n", printf("lcInOrgX: %d, lcInOrgY: %d, lcInExtX: %d, lcInExtY: %d\n",
@@ -576,7 +584,7 @@ void GHOST_Wintab::printContextDebugInfo()
m_fpInfo(WTI_DEFSYSCTX, CTX_SYSEXTY, &lc.lcSysExtY); m_fpInfo(WTI_DEFSYSCTX, CTX_SYSEXTY, &lc.lcSysExtY);
printf("WTI_DEFSYSCTX CTX_*\n"); printf("WTI_DEFSYSCTX CTX_*\n");
printContextRanges(lc); printContextRanges(lc);
for (unsigned int i = 0; i < m_numDevices; i++) { for (unsigned int i = 0; i < m_numDevices; i++) {
/* Print individual device system context. */ /* Print individual device system context. */
m_fpInfo(WTI_DSCTXS + i, 0, &lc); m_fpInfo(WTI_DSCTXS + i, 0, &lc);
@@ -604,11 +612,11 @@ void GHOST_Wintab::printContextDebugInfo()
m_fpInfo(WTI_DEVICES + i, DVC_X, &axis_x); m_fpInfo(WTI_DEVICES + i, DVC_X, &axis_x);
m_fpInfo(WTI_DEVICES + i, DVC_Y, &axis_y); m_fpInfo(WTI_DEVICES + i, DVC_Y, &axis_y);
printf("WTI_DEVICES %u axis_x org: %d, axis_y org: %d axis_x ext: %d, axis_y ext: %d\n", printf("WTI_DEVICES %u axis_x org: %d, axis_y org: %d axis_x ext: %d, axis_y ext: %d\n",
i, i,
axis_x.axMin, axis_x.axMin,
axis_y.axMin, axis_y.axMin,
axis_x.axMax - axis_x.axMin + 1, axis_x.axMax - axis_x.axMin + 1,
axis_y.axMax - axis_y.axMin + 1); axis_y.axMax - axis_y.axMin + 1);
} }
/* Other stuff while we have a logcontext. */ /* Other stuff while we have a logcontext. */

View File

@@ -195,8 +195,8 @@ enum {
G_DEBUG_XR = (1 << 19), /* XR/OpenXR messages */ G_DEBUG_XR = (1 << 19), /* XR/OpenXR messages */
G_DEBUG_XR_TIME = (1 << 20), /* XR/OpenXR timing messages */ G_DEBUG_XR_TIME = (1 << 20), /* XR/OpenXR timing messages */
G_DEBUG_GHOST = (1 << 21), /* Debug GHOST module. */ G_DEBUG_GHOST = (1 << 21), /* Debug GHOST module. */
G_DEBUG_WINTAB = (1 << 22), /* Debug Wintab. */ G_DEBUG_WINTAB = (1 << 22), /* Debug Wintab. */
}; };
#define G_DEBUG_ALL \ #define G_DEBUG_ALL \

View File

@@ -11,10 +11,8 @@ uniform sampler3D volumeScattering; /* Result of the scatter step */
uniform sampler3D volumeExtinction; uniform sampler3D volumeExtinction;
#ifdef USE_VOLUME_OPTI #ifdef USE_VOLUME_OPTI
uniform layout(r11f_g11f_b10f) uniform layout(r11f_g11f_b10f) writeonly restrict image3D finalScattering_img;
writeonly restrict image3D finalScattering_img; uniform layout(r11f_g11f_b10f) writeonly restrict image3D finalTransmittance_img;
uniform layout(r11f_g11f_b10f)
writeonly restrict image3D finalTransmittance_img;
vec3 finalScattering; vec3 finalScattering;
vec3 finalTransmittance; vec3 finalTransmittance;

View File

@@ -624,7 +624,7 @@ static void drw_call_obinfos_init(DRWObjectInfos *ob_infos, Object *ob)
drw_call_calc_orco(ob, ob_infos->orcotexfac); drw_call_calc_orco(ob, ob_infos->orcotexfac);
/* Random float value. */ /* Random float value. */
uint random = (DST.dupli_source) ? uint random = (DST.dupli_source) ?
DST.dupli_source->random_id : DST.dupli_source->random_id :
/* TODO(fclem): this is rather costly to do at runtime. Maybe we can /* TODO(fclem): this is rather costly to do at runtime. Maybe we can
* put it in ob->runtime and make depsgraph ensure it is up to date. */ * put it in ob->runtime and make depsgraph ensure it is up to date. */
BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0); BLI_hash_int_2d(BLI_hash_string(ob->id.name + 2), 0);

View File

@@ -1,6 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_material_hash.glsl) #pragma BLENDER_REQUIRE(gpu_shader_material_hash.glsl)
void node_hair_info(float hair_length, void node_hair_info(float hair_length,
out float is_strand, out float is_strand,
out float intercept, out float intercept,

View File

@@ -1,6 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_material_hash.glsl) #pragma BLENDER_REQUIRE(gpu_shader_material_hash.glsl)
void node_point_info(out vec3 position, out float radius, out float random) void node_point_info(out vec3 position, out float radius, out float random)
{ {
#ifdef POINTCLOUD_SHADER #ifdef POINTCLOUD_SHADER

View File

@@ -1,6 +1,5 @@
#pragma BLENDER_REQUIRE(gpu_shader_material_math_util.glsl) #pragma BLENDER_REQUIRE(gpu_shader_material_math_util.glsl)
void node_tex_environment_equirectangular(vec3 co, out vec3 uv) void node_tex_environment_equirectangular(vec3 co, out vec3 uv)
{ {
vec3 nco = normalize(co); vec3 nco = normalize(co);