DRW: Fix wrong integer type for drw_view_id
This commit is contained in:
@@ -81,7 +81,7 @@ typedef enum eObjectInfoFlag eObjectInfoFlag;
|
||||
/** This should be already defined at shaderCreateInfo level. */
|
||||
// # define DRW_VIEW_LEN 64
|
||||
/** Global that needs to be set correctly in each shader stage. */
|
||||
int drw_view_id = 0;
|
||||
uint drw_view_id = 0;
|
||||
/**
|
||||
* In order to reduce the memory requirements, the view id is merged with resource id to avoid
|
||||
* doubling the memory required only for view indexing.
|
||||
@@ -95,7 +95,7 @@ int drw_view_id = 0;
|
||||
(DRW_VIEW_LEN > 2) ? 2 : \
|
||||
1)
|
||||
# define DRW_VIEW_MASK ~(0xFFFFFFFFu << DRW_VIEW_SHIFT)
|
||||
# define DRW_VIEW_FROM_RESOURCE_ID drw_view_id = (drw_ResourceID & DRW_VIEW_MASK)
|
||||
# define DRW_VIEW_FROM_RESOURCE_ID drw_view_id = (uint(drw_ResourceID) & DRW_VIEW_MASK)
|
||||
#endif
|
||||
|
||||
struct FrustumCorners {
|
||||
|
||||
@@ -112,7 +112,7 @@ vec4 frustum_culling_sphere_calc(FrustumCorners frustum_corners)
|
||||
|
||||
void main()
|
||||
{
|
||||
drw_view_id = int(gl_LocalInvocationID.x);
|
||||
drw_view_id = gl_LocalInvocationID.x;
|
||||
|
||||
/* Invalid views are disabled. */
|
||||
if (all(equal(drw_view.viewinv[2].xyz, vec3(0.0)))) {
|
||||
|
||||
@@ -38,7 +38,7 @@ void main()
|
||||
Sphere inscribed_sphere = shape_sphere(bounds.bounding_sphere.xyz,
|
||||
bounds._inner_sphere_radius);
|
||||
|
||||
for (drw_view_id = 0; drw_view_id < view_len; drw_view_id++) {
|
||||
for (drw_view_id = 0u; drw_view_id < uint(view_len); drw_view_id++) {
|
||||
if (drw_view_culling.bound_sphere.w == -1.0) {
|
||||
/* View disabled. */
|
||||
mask_visibility_bit(drw_view_id);
|
||||
|
||||
Reference in New Issue
Block a user