GPU: Shaders fail to compile on NVIDIA
NVIDIA fails with segmentation fault when compiling shaders due to recent changes.
This PR tweaks the shader code to work around the segmentation fault.
Issue introduced by: 7f43699ebf
Pull Request: https://projects.blender.org/blender/blender/pulls/118744
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
void main()
|
||||
{
|
||||
ivec3 gid = ivec3(gl_GlobalInvocationID);
|
||||
ivec3 nthreads = ivec3(gl_NumWorkGroups) * ivec3(gl_WorkGroupSize);
|
||||
ivec3 nthreads = ivec3(gl_NumWorkGroups * gl_WorkGroupSize);
|
||||
for (int y = gid.y + gid.z * nthreads.y; y < ncurves; y += nthreads.y * nthreads.z) {
|
||||
for (int x = gid.x; x < elements_per_curve; x += nthreads.x) {
|
||||
int store_index = (x + y * elements_per_curve) * 2;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
void main()
|
||||
{
|
||||
ivec3 gid = ivec3(gl_GlobalInvocationID);
|
||||
ivec3 nthreads = ivec3(gl_NumWorkGroups) * ivec3(gl_WorkGroupSize);
|
||||
ivec3 nthreads = ivec3(gl_NumWorkGroups * gl_WorkGroupSize);
|
||||
for (int y = gid.y + gid.z * nthreads.y; y < ncurves; y += nthreads.y * nthreads.z) {
|
||||
for (int x = gid.x; x < elements_per_curve; x += nthreads.x) {
|
||||
int store_index = x + y * elements_per_curve;
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
void main()
|
||||
{
|
||||
ivec3 gid = ivec3(gl_GlobalInvocationID);
|
||||
ivec3 nthreads = ivec3(gl_NumWorkGroups) * ivec3(gl_WorkGroupSize);
|
||||
for (int y = gid.y + gid.z * nthreads.y; y < ncurves; y += nthreads.y * nthreads.z)
|
||||
ivec3 nthreads = ivec3(gl_NumWorkGroups * gl_WorkGroupSize);
|
||||
for (int y = gid.y + gid.z * nthreads.y; y < ncurves; y += nthreads.y * nthreads.z) {
|
||||
for (int x = gid.x; x < elements_per_curve; x += nthreads.x) {
|
||||
int store_index = (x + y * elements_per_curve) * 6;
|
||||
uint t = x + y * (elements_per_curve * 2 + 2);
|
||||
@@ -23,4 +23,5 @@ void main()
|
||||
out_indices[store_index + 4] = t + 3u;
|
||||
out_indices[store_index + 5] = t + 2u;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user