Commit 201f136c by Chris Forbes

Remove remnants of non-descriptor-backed textures

All texture access in Vulkan is through descriptors. We don't need any of the context-side state for this. Bug: b/125909515 Change-Id: I7d0846d2fdcc03504e2dd3f44580fb5c09188c1a Reviewed-on: https://swiftshader-review.googlesource.com/c/25331Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 3014e76b
......@@ -188,14 +188,11 @@ namespace sw
float depthBias;
float slopeDepthBias;
Sampler sampler[TOTAL_IMAGE_UNITS];
VkFormat renderTargetInternalFormat(int index);
int colorWriteActive();
int colorWriteActive(int index);
bool colorUsed();
vk::ImageView *texture[TOTAL_IMAGE_UNITS];
Stream input[MAX_VERTEX_INPUTS];
void *indexBuffer;
......
......@@ -89,186 +89,6 @@ namespace sw
context->stencilBufferLayer = layer;
}
void PixelProcessor::setTextureFilter(unsigned int sampler, FilterType textureFilter)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setTextureFilter(textureFilter);
}
else ASSERT(false);
}
void PixelProcessor::setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setMipmapFilter(mipmapFilter);
}
else ASSERT(false);
}
void PixelProcessor::setGatherEnable(unsigned int sampler, bool enable)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setGatherEnable(enable);
}
else ASSERT(false);
}
void PixelProcessor::setAddressingModeU(unsigned int sampler, AddressingMode addressMode)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setAddressingModeU(addressMode);
}
else ASSERT(false);
}
void PixelProcessor::setAddressingModeV(unsigned int sampler, AddressingMode addressMode)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setAddressingModeV(addressMode);
}
else ASSERT(false);
}
void PixelProcessor::setAddressingModeW(unsigned int sampler, AddressingMode addressMode)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setAddressingModeW(addressMode);
}
else ASSERT(false);
}
void PixelProcessor::setReadSRGB(unsigned int sampler, bool sRGB)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setReadSRGB(sRGB);
}
else ASSERT(false);
}
void PixelProcessor::setMipmapLOD(unsigned int sampler, float bias)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setMipmapLOD(bias);
}
else ASSERT(false);
}
void PixelProcessor::setBorderColor(unsigned int sampler, const Color<float> &borderColor)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setBorderColor(borderColor);
}
else ASSERT(false);
}
void PixelProcessor::setMaxAnisotropy(unsigned int sampler, float maxAnisotropy)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setMaxAnisotropy(maxAnisotropy);
}
else ASSERT(false);
}
void PixelProcessor::setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setHighPrecisionFiltering(highPrecisionFiltering);
}
else ASSERT(false);
}
void PixelProcessor::setSwizzleR(unsigned int sampler, SwizzleType swizzleR)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setSwizzleR(swizzleR);
}
else ASSERT(false);
}
void PixelProcessor::setSwizzleG(unsigned int sampler, SwizzleType swizzleG)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setSwizzleG(swizzleG);
}
else ASSERT(false);
}
void PixelProcessor::setSwizzleB(unsigned int sampler, SwizzleType swizzleB)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setSwizzleB(swizzleB);
}
else ASSERT(false);
}
void PixelProcessor::setSwizzleA(unsigned int sampler, SwizzleType swizzleA)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setSwizzleA(swizzleA);
}
else ASSERT(false);
}
void PixelProcessor::setCompareFunc(unsigned int sampler, CompareFunc compFunc)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setCompareFunc(compFunc);
}
else ASSERT(false);
}
void PixelProcessor::setBaseLevel(unsigned int sampler, int baseLevel)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setBaseLevel(baseLevel);
}
else ASSERT(false);
}
void PixelProcessor::setMaxLevel(unsigned int sampler, int maxLevel)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setMaxLevel(maxLevel);
}
else ASSERT(false);
}
void PixelProcessor::setMinLod(unsigned int sampler, float minLod)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setMinLod(minLod);
}
else ASSERT(false);
}
void PixelProcessor::setMaxLod(unsigned int sampler, float maxLod)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setMaxLod(maxLod);
}
else ASSERT(false);
}
void PixelProcessor::setWriteSRGB(bool sRGB)
{
context->setWriteSRGB(sRGB);
......
......@@ -149,33 +149,6 @@ namespace sw
void setDepthBuffer(vk::ImageView *depthBuffer, unsigned int layer = 0);
void setStencilBuffer(vk::ImageView *stencilBuffer, unsigned int layer = 0);
void setTexCoordIndex(unsigned int stage, int texCoordIndex);
void setConstantColor(unsigned int stage, const Color<float> &constantColor);
void setBumpmapMatrix(unsigned int stage, int element, float value);
void setLuminanceScale(unsigned int stage, float value);
void setLuminanceOffset(unsigned int stage, float value);
void setTextureFilter(unsigned int sampler, FilterType textureFilter);
void setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter);
void setGatherEnable(unsigned int sampler, bool enable);
void setAddressingModeU(unsigned int sampler, AddressingMode addressingMode);
void setAddressingModeV(unsigned int sampler, AddressingMode addressingMode);
void setAddressingModeW(unsigned int sampler, AddressingMode addressingMode);
void setReadSRGB(unsigned int sampler, bool sRGB);
void setMipmapLOD(unsigned int sampler, float bias);
void setBorderColor(unsigned int sampler, const Color<float> &borderColor);
void setMaxAnisotropy(unsigned int sampler, float maxAnisotropy);
void setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering);
void setSwizzleR(unsigned int sampler, SwizzleType swizzleR);
void setSwizzleG(unsigned int sampler, SwizzleType swizzleG);
void setSwizzleB(unsigned int sampler, SwizzleType swizzleB);
void setSwizzleA(unsigned int sampler, SwizzleType swizzleA);
void setCompareFunc(unsigned int sampler, CompareFunc compare);
void setBaseLevel(unsigned int sampler, int baseLevel);
void setMaxLevel(unsigned int sampler, int maxLevel);
void setMinLod(unsigned int sampler, float minLod);
void setMaxLod(unsigned int sampler, float maxLod);
void setWriteSRGB(bool sRGB);
void setDepthBufferEnable(bool depthBufferEnable);
void setDepthCompare(VkCompareOp depthCompareMode);
......
......@@ -324,29 +324,6 @@ namespace sw
data->indices = context->indexBuffer;
}
for(int sampler = 0; sampler < TOTAL_IMAGE_UNITS; sampler++)
{
draw->texture[sampler] = 0;
}
for(int sampler = 0; sampler < TEXTURE_IMAGE_UNITS; sampler++)
{
if(pixelState.sampler[sampler].textureType != TEXTURE_NULL)
{
draw->texture[sampler] = context->texture[sampler];
data->mipmap[sampler] = context->sampler[sampler].getTextureData();
}
}
for(int sampler = 0; sampler < VERTEX_TEXTURE_IMAGE_UNITS; sampler++)
{
if(vertexState.sampler[sampler].textureType != TEXTURE_NULL)
{
draw->texture[TEXTURE_IMAGE_UNITS + sampler] = context->texture[TEXTURE_IMAGE_UNITS + sampler];
data->mipmap[TEXTURE_IMAGE_UNITS + sampler] = context->sampler[TEXTURE_IMAGE_UNITS + sampler].getTextureData();
}
}
if(context->vertexShader->hasBuiltinInput(spv::BuiltInInstanceId))
{
data->instanceID = context->instanceID;
......@@ -1569,278 +1546,6 @@ namespace sw
sw::transparencyAntialiasing = transparencyAntialiasing;
}
bool Renderer::isReadWriteTexture(int sampler)
{
for(int index = 0; index < RENDERTARGETS; index++)
{
if(context->renderTarget[index] && context->texture[sampler] == context->renderTarget[index])
{
return true;
}
}
if(context->depthBuffer && context->texture[sampler] == context->depthBuffer)
{
return true;
}
return false;
}
void Renderer::setTextureResource(unsigned int sampler, vk::ImageView *resource)
{
ASSERT(sampler < TOTAL_IMAGE_UNITS);
context->texture[sampler] = resource;
}
void Renderer::setTextureLevel(unsigned int sampler, unsigned int face, unsigned int level, Surface *surface, TextureType type)
{
ASSERT(sampler < TOTAL_IMAGE_UNITS && face < 6 && level < MIPMAP_LEVELS);
context->sampler[sampler].setTextureLevel(face, level, surface, type);
}
void Renderer::setTextureFilter(SamplerType type, int sampler, FilterType textureFilter)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setTextureFilter(sampler, textureFilter);
}
else
{
VertexProcessor::setTextureFilter(sampler, textureFilter);
}
}
void Renderer::setMipmapFilter(SamplerType type, int sampler, MipmapType mipmapFilter)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setMipmapFilter(sampler, mipmapFilter);
}
else
{
VertexProcessor::setMipmapFilter(sampler, mipmapFilter);
}
}
void Renderer::setGatherEnable(SamplerType type, int sampler, bool enable)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setGatherEnable(sampler, enable);
}
else
{
VertexProcessor::setGatherEnable(sampler, enable);
}
}
void Renderer::setAddressingModeU(SamplerType type, int sampler, AddressingMode addressMode)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setAddressingModeU(sampler, addressMode);
}
else
{
VertexProcessor::setAddressingModeU(sampler, addressMode);
}
}
void Renderer::setAddressingModeV(SamplerType type, int sampler, AddressingMode addressMode)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setAddressingModeV(sampler, addressMode);
}
else
{
VertexProcessor::setAddressingModeV(sampler, addressMode);
}
}
void Renderer::setAddressingModeW(SamplerType type, int sampler, AddressingMode addressMode)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setAddressingModeW(sampler, addressMode);
}
else
{
VertexProcessor::setAddressingModeW(sampler, addressMode);
}
}
void Renderer::setReadSRGB(SamplerType type, int sampler, bool sRGB)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setReadSRGB(sampler, sRGB);
}
else
{
VertexProcessor::setReadSRGB(sampler, sRGB);
}
}
void Renderer::setMipmapLOD(SamplerType type, int sampler, float bias)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setMipmapLOD(sampler, bias);
}
else
{
VertexProcessor::setMipmapLOD(sampler, bias);
}
}
void Renderer::setBorderColor(SamplerType type, int sampler, const Color<float> &borderColor)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setBorderColor(sampler, borderColor);
}
else
{
VertexProcessor::setBorderColor(sampler, borderColor);
}
}
void Renderer::setMaxAnisotropy(SamplerType type, int sampler, float maxAnisotropy)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setMaxAnisotropy(sampler, maxAnisotropy);
}
else
{
VertexProcessor::setMaxAnisotropy(sampler, maxAnisotropy);
}
}
void Renderer::setHighPrecisionFiltering(SamplerType type, int sampler, bool highPrecisionFiltering)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setHighPrecisionFiltering(sampler, highPrecisionFiltering);
}
else
{
VertexProcessor::setHighPrecisionFiltering(sampler, highPrecisionFiltering);
}
}
void Renderer::setSwizzleR(SamplerType type, int sampler, SwizzleType swizzleR)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setSwizzleR(sampler, swizzleR);
}
else
{
VertexProcessor::setSwizzleR(sampler, swizzleR);
}
}
void Renderer::setSwizzleG(SamplerType type, int sampler, SwizzleType swizzleG)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setSwizzleG(sampler, swizzleG);
}
else
{
VertexProcessor::setSwizzleG(sampler, swizzleG);
}
}
void Renderer::setSwizzleB(SamplerType type, int sampler, SwizzleType swizzleB)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setSwizzleB(sampler, swizzleB);
}
else
{
VertexProcessor::setSwizzleB(sampler, swizzleB);
}
}
void Renderer::setSwizzleA(SamplerType type, int sampler, SwizzleType swizzleA)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setSwizzleA(sampler, swizzleA);
}
else
{
VertexProcessor::setSwizzleA(sampler, swizzleA);
}
}
void Renderer::setCompareFunc(SamplerType type, int sampler, CompareFunc compFunc)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setCompareFunc(sampler, compFunc);
}
else
{
VertexProcessor::setCompareFunc(sampler, compFunc);
}
}
void Renderer::setBaseLevel(SamplerType type, int sampler, int baseLevel)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setBaseLevel(sampler, baseLevel);
}
else
{
VertexProcessor::setBaseLevel(sampler, baseLevel);
}
}
void Renderer::setMaxLevel(SamplerType type, int sampler, int maxLevel)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setMaxLevel(sampler, maxLevel);
}
else
{
VertexProcessor::setMaxLevel(sampler, maxLevel);
}
}
void Renderer::setMinLod(SamplerType type, int sampler, float minLod)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setMinLod(sampler, minLod);
}
else
{
VertexProcessor::setMinLod(sampler, minLod);
}
}
void Renderer::setMaxLod(SamplerType type, int sampler, float maxLod)
{
if(type == SAMPLER_PIXEL)
{
PixelProcessor::setMaxLod(sampler, maxLod);
}
else
{
VertexProcessor::setMaxLod(sampler, maxLod);
}
}
void Renderer::setLineWidth(float width)
{
context->lineWidth = width;
......
......@@ -258,30 +258,6 @@ namespace sw
void setMultiSampleMask(unsigned int mask);
void setTransparencyAntialiasing(TransparencyAntialiasing transparencyAntialiasing);
void setTextureResource(unsigned int sampler, vk::ImageView *resource);
void setTextureLevel(unsigned int sampler, unsigned int face, unsigned int level, Surface *surface, TextureType type);
void setTextureFilter(SamplerType type, int sampler, FilterType textureFilter);
void setMipmapFilter(SamplerType type, int sampler, MipmapType mipmapFilter);
void setGatherEnable(SamplerType type, int sampler, bool enable);
void setAddressingModeU(SamplerType type, int sampler, AddressingMode addressingMode);
void setAddressingModeV(SamplerType type, int sampler, AddressingMode addressingMode);
void setAddressingModeW(SamplerType type, int sampler, AddressingMode addressingMode);
void setReadSRGB(SamplerType type, int sampler, bool sRGB);
void setMipmapLOD(SamplerType type, int sampler, float bias);
void setBorderColor(SamplerType type, int sampler, const Color<float> &borderColor);
void setMaxAnisotropy(SamplerType type, int sampler, float maxAnisotropy);
void setHighPrecisionFiltering(SamplerType type, int sampler, bool highPrecisionFiltering);
void setSwizzleR(SamplerType type, int sampler, SwizzleType swizzleR);
void setSwizzleG(SamplerType type, int sampler, SwizzleType swizzleG);
void setSwizzleB(SamplerType type, int sampler, SwizzleType swizzleB);
void setSwizzleA(SamplerType type, int sampler, SwizzleType swizzleA);
void setCompareFunc(SamplerType type, int sampler, CompareFunc compare);
void setBaseLevel(SamplerType type, int sampler, int baseLevel);
void setMaxLevel(SamplerType type, int sampler, int maxLevel);
void setMinLod(SamplerType type, int sampler, float minLod);
void setMaxLod(SamplerType type, int sampler, float maxLod);
void setLineWidth(float width);
void setDepthBias(float bias);
......@@ -331,7 +307,6 @@ namespace sw
bool setupLine(Primitive &primitive, Triangle &triangle, const DrawCall &draw);
bool setupPoint(Primitive &primitive, Triangle &triangle, const DrawCall &draw);
bool isReadWriteTexture(int sampler);
void updateConfiguration(bool initialUpdate = false);
void initializeThreads();
void terminateThreads();
......@@ -425,7 +400,6 @@ namespace sw
vk::ImageView *renderTarget[RENDERTARGETS];
vk::ImageView *depthBuffer;
vk::ImageView *stencilBuffer;
vk::ImageView *texture[TOTAL_IMAGE_UNITS];
std::list<Query*> *queries;
......
......@@ -91,186 +91,6 @@ namespace sw
context->instanceID = instanceID;
}
void VertexProcessor::setTextureFilter(unsigned int sampler, FilterType textureFilter)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setTextureFilter(textureFilter);
}
else ASSERT(false);
}
void VertexProcessor::setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setMipmapFilter(mipmapFilter);
}
else ASSERT(false);
}
void VertexProcessor::setGatherEnable(unsigned int sampler, bool enable)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setGatherEnable(enable);
}
else ASSERT(false);
}
void VertexProcessor::setAddressingModeU(unsigned int sampler, AddressingMode addressMode)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setAddressingModeU(addressMode);
}
else ASSERT(false);
}
void VertexProcessor::setAddressingModeV(unsigned int sampler, AddressingMode addressMode)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setAddressingModeV(addressMode);
}
else ASSERT(false);
}
void VertexProcessor::setAddressingModeW(unsigned int sampler, AddressingMode addressMode)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setAddressingModeW(addressMode);
}
else ASSERT(false);
}
void VertexProcessor::setReadSRGB(unsigned int sampler, bool sRGB)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setReadSRGB(sRGB);
}
else ASSERT(false);
}
void VertexProcessor::setMipmapLOD(unsigned int sampler, float bias)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setMipmapLOD(bias);
}
else ASSERT(false);
}
void VertexProcessor::setBorderColor(unsigned int sampler, const Color<float> &borderColor)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setBorderColor(borderColor);
}
else ASSERT(false);
}
void VertexProcessor::setMaxAnisotropy(unsigned int sampler, float maxAnisotropy)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setMaxAnisotropy(maxAnisotropy);
}
else ASSERT(false);
}
void VertexProcessor::setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering)
{
if(sampler < TEXTURE_IMAGE_UNITS)
{
context->sampler[sampler].setHighPrecisionFiltering(highPrecisionFiltering);
}
else ASSERT(false);
}
void VertexProcessor::setSwizzleR(unsigned int sampler, SwizzleType swizzleR)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setSwizzleR(swizzleR);
}
else ASSERT(false);
}
void VertexProcessor::setSwizzleG(unsigned int sampler, SwizzleType swizzleG)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setSwizzleG(swizzleG);
}
else ASSERT(false);
}
void VertexProcessor::setSwizzleB(unsigned int sampler, SwizzleType swizzleB)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setSwizzleB(swizzleB);
}
else ASSERT(false);
}
void VertexProcessor::setSwizzleA(unsigned int sampler, SwizzleType swizzleA)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setSwizzleA(swizzleA);
}
else ASSERT(false);
}
void VertexProcessor::setCompareFunc(unsigned int sampler, CompareFunc compFunc)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setCompareFunc(compFunc);
}
else ASSERT(false);
}
void VertexProcessor::setBaseLevel(unsigned int sampler, int baseLevel)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setBaseLevel(baseLevel);
}
else ASSERT(false);
}
void VertexProcessor::setMaxLevel(unsigned int sampler, int maxLevel)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setMaxLevel(maxLevel);
}
else ASSERT(false);
}
void VertexProcessor::setMinLod(unsigned int sampler, float minLod)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setMinLod(minLod);
}
else ASSERT(false);
}
void VertexProcessor::setMaxLod(unsigned int sampler, float maxLod)
{
if(sampler < VERTEX_TEXTURE_IMAGE_UNITS)
{
context->sampler[TEXTURE_IMAGE_UNITS + sampler].setMaxLod(maxLod);
}
else ASSERT(false);
}
void VertexProcessor::setRoutineCacheSize(int cacheSize)
{
delete routineCache;
......
......@@ -91,27 +91,6 @@ namespace sw
void setInstanceID(int instanceID);
void setTextureFilter(unsigned int sampler, FilterType textureFilter);
void setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter);
void setGatherEnable(unsigned int sampler, bool enable);
void setAddressingModeU(unsigned int sampler, AddressingMode addressingMode);
void setAddressingModeV(unsigned int sampler, AddressingMode addressingMode);
void setAddressingModeW(unsigned int sampler, AddressingMode addressingMode);
void setReadSRGB(unsigned int sampler, bool sRGB);
void setMipmapLOD(unsigned int sampler, float bias);
void setBorderColor(unsigned int sampler, const Color<float> &borderColor);
void setMaxAnisotropy(unsigned int stage, float maxAnisotropy);
void setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering);
void setSwizzleR(unsigned int sampler, SwizzleType swizzleR);
void setSwizzleG(unsigned int sampler, SwizzleType swizzleG);
void setSwizzleB(unsigned int sampler, SwizzleType swizzleB);
void setSwizzleA(unsigned int sampler, SwizzleType swizzleA);
void setCompareFunc(unsigned int sampler, CompareFunc compare);
void setBaseLevel(unsigned int sampler, int baseLevel);
void setMaxLevel(unsigned int sampler, int maxLevel);
void setMinLod(unsigned int sampler, float minLod);
void setMaxLod(unsigned int sampler, float maxLod);
protected:
const State update(DrawType drawType);
Routine *routine(const State &state);
......
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