GPUOpen-Tools / gpu_performance_api

GPU Performance API for AMD GPUs
MIT License
250 stars 46 forks source link

memset of result buffer only clears first 25% #59

Closed AdamJMiles closed 3 months ago

AdamJMiles commented 2 years ago

https://github.com/GPUOpen-Tools/gpu_performance_api/blob/30cd97819afd6f560a2dcd6847f5dde1fba08854/source/examples/dx12/dx12_color_cube/cube_sample.cc#L2311

I'm not sure why the sizeof(int) is there? Did the author think memset took a number of DWORDs to memset instead of bytes?

PLohrmannAMD commented 2 years ago

Woah! You're right! Thanks for catching that and pointing out the mistake! It looks like the same thing was done in the dx11 example here: https://github.com/GPUOpen-Tools/gpu_performance_api/blob/30cd97819afd6f560a2dcd6847f5dde1fba08854/source/examples/dx11/dx11_triangle/dx11_triangle.cc#L1024

Would you like to submit a pull request with a fix to these two samples?

AdamJMiles commented 2 years ago

Will do!

https://github.com/GPUOpen-Tools/gpu_performance_api/pull/60