GPU: Use Same Type in Comparisons. #106789

Merged
Jeroen Bakker merged 4 commits from Jeroen-Bakker/blender:gpu-compare-similar-types into main 2023-04-11 13:46:22 +02:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 4dd1b6ea98 - Show all commits

View File

@ -37,7 +37,7 @@ void main()
bool is_gpencil = ((vert[1].flag & VERT_GPENCIL_BEZT_HANDLE) != 0u);
/* If handle type is only selected and the edge is not selected, don't show. */
if (uint(curveHandleDisplay != CURVE_HANDLE_ALL) && (!handle_selected)) {
if ((uint(curveHandleDisplay) != CURVE_HANDLE_ALL) && (!handle_selected)) {
Jeroen-Bakker marked this conversation as resolved Outdated

I believe it is (uint(curveHandleDisplay) != CURVE_HANDLE_ALL) you want here.

I believe it is `(uint(curveHandleDisplay) != CURVE_HANDLE_ALL)` you want here.
/* Nurbs must show the handles always. */
bool is_u_segment = (((vert[1].flag ^ vert[0].flag) & EVEN_U_BIT) != 0u);
if ((!is_u_segment) && (color_id <= 4u)) {

View File

@ -58,7 +58,7 @@ void main()
bool is_gpencil = ((vert_flag[1] & VERT_GPENCIL_BEZT_HANDLE) != 0u);
/* If handle type is only selected and the edge is not selected, don't show. */
if (uint(curveHandleDisplay != CURVE_HANDLE_ALL) && (!handle_selected)) {
if ((uint(curveHandleDisplay) != CURVE_HANDLE_ALL) && (!handle_selected)) {
Jeroen-Bakker marked this conversation as resolved Outdated

Same here.

Same here.
/* Nurbs must show the handles always. */
bool is_u_segment = (((vert_flag[1] ^ vert_flag[0]) & EVEN_U_BIT) != 0u);
if ((!is_u_segment) && (color_id <= 4u)) {

View File

@ -26,7 +26,7 @@ void main()
view_clipping_distances(world_pos);
bool show_handle = showCurveHandles;
if (uint(curveHandleDisplay == CURVE_HANDLE_SELECTED) && ((data & VERT_SELECTED_BEZT_HANDLE) == 0u)) {
if ((uint(curveHandleDisplay) == CURVE_HANDLE_SELECTED) && ((data & VERT_SELECTED_BEZT_HANDLE) == 0u)) {
Jeroen-Bakker marked this conversation as resolved Outdated

Same here

Same here
show_handle = false;
}
Jeroen-Bakker marked this conversation as resolved
Review

0 -> 0u on line 33

`0` -> `0u` on line 33