Commit f4b99b67 by Ben Clayton Committed by Ben Clayton

Silence warnings: Remove all unused local variables

Bug: b/123933266 Change-Id: If8fa478aa65f5c0046ca635a8d133911f8a59977 Reviewed-on: https://swiftshader-review.googlesource.com/c/25010 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 8f79d388
...@@ -1518,7 +1518,6 @@ namespace sw ...@@ -1518,7 +1518,6 @@ namespace sw
bool Renderer::setupPoint(Primitive &primitive, Triangle &triangle, const DrawCall &draw) bool Renderer::setupPoint(Primitive &primitive, Triangle &triangle, const DrawCall &draw)
{ {
const SetupProcessor::RoutinePointer &setupRoutine = draw.setupPointer; const SetupProcessor::RoutinePointer &setupRoutine = draw.setupPointer;
const SetupProcessor::State &state = draw.setupState;
const DrawData &data = *draw.data; const DrawData &data = *draw.data;
Vertex &v = triangle.v0; Vertex &v = triangle.v0;
......
...@@ -95,8 +95,6 @@ namespace sw ...@@ -95,8 +95,6 @@ namespace sw
state.gradient[interpolant] = context->pixelShader->inputs[interpolant]; state.gradient[interpolant] = context->pixelShader->inputs[interpolant];
} }
const bool point = context->isDrawPoint();
state.hash = state.computeHash(); state.hash = state.computeHash();
return state; return state;
......
...@@ -2499,7 +2499,7 @@ namespace glsl ...@@ -2499,7 +2499,7 @@ namespace glsl
{ {
for(int index = 0; index < dst->totalRegisterCount(); index++) for(int index = 0; index < dst->totalRegisterCount(); index++)
{ {
Instruction *mov = emit(sw::Shader::OPCODE_MOV, dst, index, src, offset + index); emit(sw::Shader::OPCODE_MOV, dst, index, src, offset + index);
} }
} }
......
...@@ -1148,6 +1148,8 @@ EGLImage CreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBu ...@@ -1148,6 +1148,8 @@ EGLImage CreateImage(EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBu
} }
EGLenum imagePreserved = EGL_FALSE; EGLenum imagePreserved = EGL_FALSE;
(void)imagePreserved; // currently unused
GLuint textureLevel = 0; GLuint textureLevel = 0;
if(attrib_list) if(attrib_list)
{ {
......
...@@ -374,7 +374,6 @@ namespace es1 ...@@ -374,7 +374,6 @@ namespace es1
sw::byte *sourceBuffer = (sw::byte*)source->lockInternal(0, 0, sRect.slice, LOCK_READONLY, PUBLIC); sw::byte *sourceBuffer = (sw::byte*)source->lockInternal(0, 0, sRect.slice, LOCK_READONLY, PUBLIC);
sw::byte *destBuffer = (sw::byte*)dest->lockInternal(0, 0, dRect.slice, LOCK_DISCARD, PUBLIC); sw::byte *destBuffer = (sw::byte*)dest->lockInternal(0, 0, dRect.slice, LOCK_DISCARD, PUBLIC);
unsigned int width = source->getWidth();
unsigned int height = source->getHeight(); unsigned int height = source->getHeight();
unsigned int pitch = source->getInternalPitchB(); unsigned int pitch = source->getInternalPitchB();
...@@ -395,7 +394,6 @@ namespace es1 ...@@ -395,7 +394,6 @@ namespace es1
sw::byte *sourceBuffer = (sw::byte*)source->lockStencil(0, 0, 0, PUBLIC); sw::byte *sourceBuffer = (sw::byte*)source->lockStencil(0, 0, 0, PUBLIC);
sw::byte *destBuffer = (sw::byte*)dest->lockStencil(0, 0, 0, PUBLIC); sw::byte *destBuffer = (sw::byte*)dest->lockStencil(0, 0, 0, PUBLIC);
unsigned int width = source->getWidth();
unsigned int height = source->getHeight(); unsigned int height = source->getHeight();
unsigned int pitch = source->getStencilPitchB(); unsigned int pitch = source->getStencilPitchB();
......
...@@ -44,8 +44,6 @@ namespace sw ...@@ -44,8 +44,6 @@ namespace sw
Pointer<Byte> tagCache = cache + OFFSET(VertexCache,tag); Pointer<Byte> tagCache = cache + OFFSET(VertexCache,tag);
UInt vertexCount = *Pointer<UInt>(task + OFFSET(VertexTask,vertexCount)); UInt vertexCount = *Pointer<UInt>(task + OFFSET(VertexTask,vertexCount));
UInt primitiveNumber = *Pointer<UInt>(task + OFFSET(VertexTask, primitiveStart));
UInt indexInPrimitive = 0;
constants = *Pointer<Pointer<Byte>>(data + OFFSET(DrawData,constants)); constants = *Pointer<Pointer<Byte>>(data + OFFSET(DrawData,constants));
......
...@@ -2358,10 +2358,6 @@ namespace sw ...@@ -2358,10 +2358,6 @@ namespace sw
const int oneBits = 0x3F7FFFFF; // Value just under 1.0f const int oneBits = 0x3F7FFFFF; // Value just under 1.0f
const int twoBits = 0x3FFFFFFF; // Value just under 2.0f const int twoBits = 0x3FFFFFFF; // Value just under 2.0f
bool pointFilter = state.textureFilter == FILTER_POINT ||
state.textureFilter == FILTER_MIN_POINT_MAG_LINEAR ||
state.textureFilter == FILTER_MIN_LINEAR_MAG_POINT;
Float4 coord = uvw; Float4 coord = uvw;
if(state.textureType == TEXTURE_RECTANGLE) if(state.textureType == TEXTURE_RECTANGLE)
......
...@@ -62,7 +62,6 @@ void Image::bind(VkDeviceMemory pDeviceMemory, VkDeviceSize pMemoryOffset) ...@@ -62,7 +62,6 @@ void Image::bind(VkDeviceMemory pDeviceMemory, VkDeviceSize pMemoryOffset)
void Image::getSubresourceLayout(const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) const void Image::getSubresourceLayout(const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) const
{ {
uint32_t bpp = bytesPerTexel(flags);
pLayout->offset = getMemoryOffset(flags, pSubresource->mipLevel, pSubresource->arrayLayer); pLayout->offset = getMemoryOffset(flags, pSubresource->mipLevel, pSubresource->arrayLayer);
pLayout->size = getMipLevelSize(flags, pSubresource->mipLevel); pLayout->size = getMipLevelSize(flags, pSubresource->mipLevel);
pLayout->rowPitch = rowPitchBytes(flags, pSubresource->mipLevel); pLayout->rowPitch = rowPitchBytes(flags, pSubresource->mipLevel);
......
...@@ -92,8 +92,6 @@ void ImageView::clear(const VkClearValue& clearValue, const VkImageAspectFlags a ...@@ -92,8 +92,6 @@ void ImageView::clear(const VkClearValue& clearValue, const VkImageAspectFlags a
UNIMPLEMENTED(); UNIMPLEMENTED();
} }
VkImageSubresourceRange sr = subresourceRange;
sr.aspectMask = aspectMask;
image->clear(clearValue, renderArea, subresourceRange); image->clear(clearValue, renderArea, subresourceRange);
} }
......
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