You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Merge pull request #54403 from briansemrau/fix-small-fogvolume
FogVolume don't dispatch compute with zero-dimension groups
This commit is contained in:
@@ -8049,6 +8049,9 @@ void RenderingDeviceVulkan::compute_list_dispatch(ComputeListID p_list, uint32_t
|
|||||||
ComputeList *cl = compute_list;
|
ComputeList *cl = compute_list;
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
ERR_FAIL_COND_MSG(p_x_groups == 0, "Dispatch amount of X compute groups (" + itos(p_x_groups) + ") is zero.");
|
||||||
|
ERR_FAIL_COND_MSG(p_z_groups == 0, "Dispatch amount of Z compute groups (" + itos(p_z_groups) + ") is zero.");
|
||||||
|
ERR_FAIL_COND_MSG(p_y_groups == 0, "Dispatch amount of Y compute groups (" + itos(p_y_groups) + ") is zero.");
|
||||||
ERR_FAIL_COND_MSG(p_x_groups > limits.maxComputeWorkGroupCount[0],
|
ERR_FAIL_COND_MSG(p_x_groups > limits.maxComputeWorkGroupCount[0],
|
||||||
"Dispatch amount of X compute groups (" + itos(p_x_groups) + ") is larger than device limit (" + itos(limits.maxComputeWorkGroupCount[0]) + ")");
|
"Dispatch amount of X compute groups (" + itos(p_x_groups) + ") is larger than device limit (" + itos(limits.maxComputeWorkGroupCount[0]) + ")");
|
||||||
ERR_FAIL_COND_MSG(p_y_groups > limits.maxComputeWorkGroupCount[1],
|
ERR_FAIL_COND_MSG(p_y_groups > limits.maxComputeWorkGroupCount[1],
|
||||||
@@ -8103,6 +8106,12 @@ void RenderingDeviceVulkan::compute_list_dispatch_threads(ComputeListID p_list,
|
|||||||
ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
|
ERR_FAIL_COND(p_list != ID_TYPE_COMPUTE_LIST);
|
||||||
ERR_FAIL_COND(!compute_list);
|
ERR_FAIL_COND(!compute_list);
|
||||||
|
|
||||||
|
#ifdef DEBUG_ENABLED
|
||||||
|
ERR_FAIL_COND_MSG(p_x_threads == 0, "Dispatch amount of X compute threads (" + itos(p_x_threads) + ") is zero.");
|
||||||
|
ERR_FAIL_COND_MSG(p_y_threads == 0, "Dispatch amount of Y compute threads (" + itos(p_y_threads) + ") is zero.");
|
||||||
|
ERR_FAIL_COND_MSG(p_z_threads == 0, "Dispatch amount of Z compute threads (" + itos(p_z_threads) + ") is zero.");
|
||||||
|
#endif
|
||||||
|
|
||||||
ComputeList *cl = compute_list;
|
ComputeList *cl = compute_list;
|
||||||
|
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
|
|||||||
@@ -3954,6 +3954,10 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
|
|||||||
kernel_size = Vector3i(int32_t(rb->volumetric_fog->width), int32_t(rb->volumetric_fog->height), int32_t(rb->volumetric_fog->depth));
|
kernel_size = Vector3i(int32_t(rb->volumetric_fog->width), int32_t(rb->volumetric_fog->height), int32_t(rb->volumetric_fog->depth));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (kernel_size.x == 0 || kernel_size.y == 0 || kernel_size.z == 0) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
volumetric_fog.push_constant.position[0] = position.x;
|
volumetric_fog.push_constant.position[0] = position.x;
|
||||||
volumetric_fog.push_constant.position[1] = position.y;
|
volumetric_fog.push_constant.position[1] = position.y;
|
||||||
volumetric_fog.push_constant.position[2] = position.z;
|
volumetric_fog.push_constant.position[2] = position.z;
|
||||||
|
|||||||
Reference in New Issue
Block a user