On Wednesday, March 04, 2015 09:55:46 AM Ian Romanick wrote: > From: Ian Romanick <[email protected]> > > Both the AMD and Intel APIs provide a dataSize parameter, and this > function would merrily ignore it. Neither API specifies what to do when > the buffer isn't big enough. I take the easy route of writing all the > complete bits of data that will fit. With more complete specs, we could > probably do something different. > > I noticed this while looking into an unused parameter warning. The > warning was actually useful! > > brw_performance_monitor.c: In function 'brw_get_perf_monitor_result': > brw_performance_monitor.c:1261:37: warning: unused parameter 'data_size' > [-Wunused-parameter] > GLsizei data_size, > ^ > > v2: Fix checks to include offset in the calculation. Noticed by Jan. > > Signed-off-by: Ian Romanick <[email protected]> > Cc: Kenneth Graunke <[email protected]> > Cc: Jan Vesely <[email protected]>
Huh. I could've sworn I reviewed this patch a while back, but I can't find any evidence of that. Thanks for fixing this! The spec isn't particularly clear about whether we should write up to the very end of the byte limit (i.e. write the group name and counter name but not the value), or omit the entire last entry when there isn't space...but I think what you did is quite sensible. I'm pretty sure we're deleting most of this code in favor of Rob's efforts, but we may as well land this fix in the meantime. Reviewed-by: Kenneth Graunke <[email protected]>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
