mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Fix out of bounds writes during spirv debugging
Previously it would allow writes to width/height/depth
This commit is contained in:
@@ -405,7 +405,7 @@ public:
|
||||
for(int i = 0; i < 4; i++)
|
||||
coords[i] = uintComp(coord, i);
|
||||
|
||||
if(coords[0] > data.width || coords[1] > data.height || coords[2] > data.depth)
|
||||
if(coords[0] >= data.width || coords[1] >= data.height || coords[2] >= data.depth)
|
||||
{
|
||||
if(!IsDeviceThread())
|
||||
return rdcspv::DeviceOpResult::NeedsDevice;
|
||||
@@ -548,7 +548,7 @@ public:
|
||||
for(int i = 0; i < 4; i++)
|
||||
coords[i] = uintComp(coord, i);
|
||||
|
||||
if(coords[0] > data.width || coords[1] > data.height || coords[2] > data.depth)
|
||||
if(coords[0] >= data.width || coords[1] >= data.height || coords[2] >= data.depth)
|
||||
{
|
||||
if(!IsDeviceThread())
|
||||
return rdcspv::DeviceOpResult::NeedsDevice;
|
||||
|
||||
Reference in New Issue
Block a user