graphicscommand: Improve debug messages

This change also enables to dump volatile images.
This commit is contained in:
Hajime Hoshi 2019-07-20 14:29:04 +09:00
parent 2d079b123f
commit 0cf11d9af8
2 changed files with 10 additions and 4 deletions

View File

@ -319,7 +319,16 @@ func (c *drawTrianglesCommand) String() string {
panic(fmt.Sprintf("graphicscommand: invalid address: %d", c.address))
}
return fmt.Sprintf("draw-triangles: dst: %d <- src: %d, colorm: %v, mode %s, filter: %s, address: %s", c.dst.id, c.src.id, c.color, mode, filter, address)
dst := fmt.Sprintf("%d", c.dst.id)
if c.dst.screen {
dst += " (screen)"
}
src := fmt.Sprintf("%d", c.src.id)
if c.src.screen {
src += " (screen)"
}
return fmt.Sprintf("draw-triangles: dst: %s <- src: %s, colorm: %v, mode %s, filter: %s, address: %s", dst, src, c.color, mode, filter, address)
}
// Exec executes the drawTrianglesCommand.

View File

@ -95,9 +95,6 @@ func RestoreIfNeeded() error {
// This is for testing usage.
func DumpImages(dir string) error {
for img := range theImages.images {
if img.volatile {
continue
}
if img.screen {
continue
}