Commit 1e7c4fec by Nicolas Capens Committed by Nicolas Capens

Remove tracing for the Device interface.

Only exported functions should need tracing for debugging purposes. BUG=18110152 Change-Id: I66c25db3954ef5e1aab5769b79a61336e8d95e73 Reviewed-on: https://swiftshader-review.googlesource.com/1243Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 3067c041
...@@ -140,8 +140,6 @@ namespace gl ...@@ -140,8 +140,6 @@ namespace gl
void Device::clearColor(unsigned int color, unsigned int rgbaMask) void Device::clearColor(unsigned int color, unsigned int rgbaMask)
{ {
TRACE("unsigned long color = 0x%0.8X", color);
if(!renderTarget) if(!renderTarget)
{ {
return; return;
...@@ -165,8 +163,6 @@ namespace gl ...@@ -165,8 +163,6 @@ namespace gl
void Device::clearDepth(float z) void Device::clearDepth(float z)
{ {
TRACE("float z = %f", z);
if(!depthStencil) if(!depthStencil)
{ {
return; return;
...@@ -193,8 +189,6 @@ namespace gl ...@@ -193,8 +189,6 @@ namespace gl
void Device::clearStencil(unsigned int stencil, unsigned int mask) void Device::clearStencil(unsigned int stencil, unsigned int mask)
{ {
TRACE("unsigned long stencil = %d", stencil);
if(!depthStencil) if(!depthStencil)
{ {
return; return;
...@@ -218,8 +212,6 @@ namespace gl ...@@ -218,8 +212,6 @@ namespace gl
Image *Device::createDepthStencilSurface(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard) Image *Device::createDepthStencilSurface(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard)
{ {
TRACE("unsigned int width = %d, unsigned int height = %d, sw::Format format = %d, int multiSampleDepth = %d, bool discard = %d", width, height, format, multiSampleDepth, discard);
if(width == 0 || height == 0 || height > OUTLINE_RESOLUTION) if(width == 0 || height == 0 || height > OUTLINE_RESOLUTION)
{ {
ERR("Invalid parameters"); ERR("Invalid parameters");
...@@ -264,8 +256,6 @@ namespace gl ...@@ -264,8 +256,6 @@ namespace gl
Image *Device::createRenderTarget(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool lockable) Image *Device::createRenderTarget(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool lockable)
{ {
TRACE("unsigned int width = %d, unsigned int height = %d, sw::Format format = %d, int multiSampleDepth = %d, bool lockable = %d", width, height, format, multiSampleDepth, lockable);
if(height > OUTLINE_RESOLUTION) if(height > OUTLINE_RESOLUTION)
{ {
ERR("Invalid parameters"); ERR("Invalid parameters");
...@@ -285,8 +275,6 @@ namespace gl ...@@ -285,8 +275,6 @@ namespace gl
void Device::drawIndexedPrimitive(PrimitiveType type, unsigned int indexOffset, unsigned int primitiveCount, int indexSize) void Device::drawIndexedPrimitive(PrimitiveType type, unsigned int indexOffset, unsigned int primitiveCount, int indexSize)
{ {
TRACE("");
if(!bindResources() || !primitiveCount) if(!bindResources() || !primitiveCount)
{ {
return; return;
...@@ -343,8 +331,6 @@ namespace gl ...@@ -343,8 +331,6 @@ namespace gl
void Device::drawPrimitive(PrimitiveType primitiveType, unsigned int primitiveCount) void Device::drawPrimitive(PrimitiveType primitiveType, unsigned int primitiveCount)
{ {
TRACE("");
if(!bindResources() || !primitiveCount) if(!bindResources() || !primitiveCount)
{ {
return; return;
...@@ -371,8 +357,6 @@ namespace gl ...@@ -371,8 +357,6 @@ namespace gl
void Device::setDepthStencilSurface(Image *depthStencil) void Device::setDepthStencilSurface(Image *depthStencil)
{ {
TRACE("Image *newDepthStencil = 0x%0.8p", depthStencil);
if(this->depthStencil == depthStencil) if(this->depthStencil == depthStencil)
{ {
return; return;
...@@ -400,8 +384,6 @@ namespace gl ...@@ -400,8 +384,6 @@ namespace gl
void Device::setRenderTarget(Image *renderTarget) void Device::setRenderTarget(Image *renderTarget)
{ {
TRACE("Image *newRenderTarget = 0x%0.8p", renderTarget);
if(renderTarget) if(renderTarget)
{ {
renderTarget->addRef(); renderTarget->addRef();
...@@ -419,22 +401,16 @@ namespace gl ...@@ -419,22 +401,16 @@ namespace gl
void Device::setScissorRect(const sw::Rect &rect) void Device::setScissorRect(const sw::Rect &rect)
{ {
TRACE("const sw::Rect *rect = 0x%0.8p", rect);
scissorRect = rect; scissorRect = rect;
} }
void Device::setViewport(const Viewport &viewport) void Device::setViewport(const Viewport &viewport)
{ {
TRACE("const Viewport *viewport = 0x%0.8p", viewport);
this->viewport = viewport; this->viewport = viewport;
} }
bool Device::stretchRect(Image *source, const sw::Rect *sourceRect, Image *dest, const sw::Rect *destRect, bool filter) bool Device::stretchRect(Image *source, const sw::Rect *sourceRect, Image *dest, const sw::Rect *destRect, bool filter)
{ {
TRACE("Image *sourceSurface = 0x%0.8p, const sw::Rect *sourceRect = 0x%0.8p, Image *destSurface = 0x%0.8p, const sw::Rect *destRect = 0x%0.8p, bool filter = %d", source, sourceRect, dest, destRect, filter);
if(!source || !dest || !validRectangle(sourceRect, source) || !validRectangle(destRect, dest)) if(!source || !dest || !validRectangle(sourceRect, source) || !validRectangle(destRect, dest))
{ {
ERR("Invalid parameters"); ERR("Invalid parameters");
......
...@@ -162,8 +162,6 @@ namespace gl ...@@ -162,8 +162,6 @@ namespace gl
void Device::clearColor(unsigned int color, unsigned int rgbaMask) void Device::clearColor(unsigned int color, unsigned int rgbaMask)
{ {
TRACE("unsigned long color = 0x%0.8X", color);
if(!renderTarget) if(!renderTarget)
{ {
return; return;
...@@ -187,8 +185,6 @@ namespace gl ...@@ -187,8 +185,6 @@ namespace gl
void Device::clearDepth(float z) void Device::clearDepth(float z)
{ {
TRACE("float z = %f", z);
if(!depthStencil) if(!depthStencil)
{ {
return; return;
...@@ -215,8 +211,6 @@ namespace gl ...@@ -215,8 +211,6 @@ namespace gl
void Device::clearStencil(unsigned int stencil, unsigned int mask) void Device::clearStencil(unsigned int stencil, unsigned int mask)
{ {
TRACE("unsigned long stencil = %d", stencil);
if(!depthStencil) if(!depthStencil)
{ {
return; return;
...@@ -240,8 +234,6 @@ namespace gl ...@@ -240,8 +234,6 @@ namespace gl
Image *Device::createDepthStencilSurface(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard) Image *Device::createDepthStencilSurface(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool discard)
{ {
TRACE("unsigned int width = %d, unsigned int height = %d, sw::Format format = %d, int multiSampleDepth = %d, bool discard = %d", width, height, format, multiSampleDepth, discard);
if(width == 0 || height == 0 || height > OUTLINE_RESOLUTION) if(width == 0 || height == 0 || height > OUTLINE_RESOLUTION)
{ {
ERR("Invalid parameters"); ERR("Invalid parameters");
...@@ -286,8 +278,6 @@ namespace gl ...@@ -286,8 +278,6 @@ namespace gl
Image *Device::createRenderTarget(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool lockable) Image *Device::createRenderTarget(unsigned int width, unsigned int height, sw::Format format, int multiSampleDepth, bool lockable)
{ {
TRACE("unsigned int width = %d, unsigned int height = %d, sw::Format format = %d, int multiSampleDepth = %d, bool lockable = %d", width, height, format, multiSampleDepth, lockable);
if(height > OUTLINE_RESOLUTION) if(height > OUTLINE_RESOLUTION)
{ {
ERR("Invalid parameters"); ERR("Invalid parameters");
...@@ -307,8 +297,6 @@ namespace gl ...@@ -307,8 +297,6 @@ namespace gl
void Device::drawIndexedPrimitive(PrimitiveType type, unsigned int indexOffset, unsigned int primitiveCount, int indexSize) void Device::drawIndexedPrimitive(PrimitiveType type, unsigned int indexOffset, unsigned int primitiveCount, int indexSize)
{ {
TRACE("");
if(!bindResources() || !primitiveCount) if(!bindResources() || !primitiveCount)
{ {
return; return;
...@@ -365,8 +353,6 @@ namespace gl ...@@ -365,8 +353,6 @@ namespace gl
void Device::drawPrimitive(PrimitiveType primitiveType, unsigned int primitiveCount) void Device::drawPrimitive(PrimitiveType primitiveType, unsigned int primitiveCount)
{ {
TRACE("");
if(!bindResources() || !primitiveCount) if(!bindResources() || !primitiveCount)
{ {
return; return;
...@@ -393,8 +379,6 @@ namespace gl ...@@ -393,8 +379,6 @@ namespace gl
void Device::setDepthStencilSurface(Image *depthStencil) void Device::setDepthStencilSurface(Image *depthStencil)
{ {
TRACE("Image *newDepthStencil = 0x%0.8p", depthStencil);
if(this->depthStencil == depthStencil) if(this->depthStencil == depthStencil)
{ {
return; return;
...@@ -417,16 +401,12 @@ namespace gl ...@@ -417,16 +401,12 @@ namespace gl
void Device::setPixelShader(PixelShader *pixelShader) void Device::setPixelShader(PixelShader *pixelShader)
{ {
TRACE("PixelShader *shader = 0x%0.8p", pixelShader);
this->pixelShader = pixelShader; this->pixelShader = pixelShader;
pixelShaderDirty = true; pixelShaderDirty = true;
} }
void Device::setPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count) void Device::setPixelShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count)
{ {
TRACE("unsigned int startRegister = %d, const int *constantData = 0x%0.8p, unsigned int count = %d", startRegister, constantData, count);
for(unsigned int i = 0; i < count && startRegister + i < 224; i++) for(unsigned int i = 0; i < count && startRegister + i < 224; i++)
{ {
pixelShaderConstantF[startRegister + i][0] = constantData[i * 4 + 0]; pixelShaderConstantF[startRegister + i][0] = constantData[i * 4 + 0];
...@@ -446,8 +426,6 @@ namespace gl ...@@ -446,8 +426,6 @@ namespace gl
void Device::setRenderTarget(Image *renderTarget) void Device::setRenderTarget(Image *renderTarget)
{ {
TRACE("Image *newRenderTarget = 0x%0.8p", renderTarget);
if(renderTarget) if(renderTarget)
{ {
renderTarget->addRef(); renderTarget->addRef();
...@@ -465,23 +443,17 @@ namespace gl ...@@ -465,23 +443,17 @@ namespace gl
void Device::setScissorRect(const sw::Rect &rect) void Device::setScissorRect(const sw::Rect &rect)
{ {
TRACE("const sw::Rect *rect = 0x%0.8p", rect);
scissorRect = rect; scissorRect = rect;
} }
void Device::setVertexShader(VertexShader *vertexShader) void Device::setVertexShader(VertexShader *vertexShader)
{ {
TRACE("VertexShader *shader = 0x%0.8p", vertexShader);
this->vertexShader = vertexShader; this->vertexShader = vertexShader;
vertexShaderDirty = true; vertexShaderDirty = true;
} }
void Device::setVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count) void Device::setVertexShaderConstantF(unsigned int startRegister, const float *constantData, unsigned int count)
{ {
TRACE("unsigned int startRegister = %d, const int *constantData = 0x%0.8p, unsigned int count = %d", startRegister, constantData, count);
for(unsigned int i = 0; i < count && startRegister + i < 256; i++) for(unsigned int i = 0; i < count && startRegister + i < 256; i++)
{ {
vertexShaderConstantF[startRegister + i][0] = constantData[i * 4 + 0]; vertexShaderConstantF[startRegister + i][0] = constantData[i * 4 + 0];
...@@ -496,15 +468,11 @@ namespace gl ...@@ -496,15 +468,11 @@ namespace gl
void Device::setViewport(const Viewport &viewport) void Device::setViewport(const Viewport &viewport)
{ {
TRACE("const Viewport *viewport = 0x%0.8p", viewport);
this->viewport = viewport; this->viewport = viewport;
} }
bool Device::stretchRect(Image *source, const sw::Rect *sourceRect, Image *dest, const sw::Rect *destRect, bool filter) bool Device::stretchRect(Image *source, const sw::Rect *sourceRect, Image *dest, const sw::Rect *destRect, bool filter)
{ {
TRACE("Image *sourceSurface = 0x%0.8p, const sw::Rect *sourceRect = 0x%0.8p, Image *destSurface = 0x%0.8p, const sw::Rect *destRect = 0x%0.8p, bool filter = %d", source, sourceRect, dest, destRect, filter);
if(!source || !dest || !validRectangle(sourceRect, source) || !validRectangle(destRect, dest)) if(!source || !dest || !validRectangle(sourceRect, source) || !validRectangle(destRect, dest))
{ {
ERR("Invalid parameters"); ERR("Invalid parameters");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment