Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 201f136

Browse files
committed
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/25331 Tested-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
1 parent 3014e76 commit 201f136

File tree

7 files changed

+0
-732
lines changed

7 files changed

+0
-732
lines changed

src/Device/Context.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,11 @@ namespace sw
188188
float depthBias;
189189
float slopeDepthBias;
190190

191-
Sampler sampler[TOTAL_IMAGE_UNITS];
192-
193191
VkFormat renderTargetInternalFormat(int index);
194192
int colorWriteActive();
195193
int colorWriteActive(int index);
196194
bool colorUsed();
197195

198-
vk::ImageView *texture[TOTAL_IMAGE_UNITS];
199196
Stream input[MAX_VERTEX_INPUTS];
200197
void *indexBuffer;
201198

src/Device/PixelProcessor.cpp

Lines changed: 0 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -89,186 +89,6 @@ namespace sw
8989
context->stencilBufferLayer = layer;
9090
}
9191

92-
void PixelProcessor::setTextureFilter(unsigned int sampler, FilterType textureFilter)
93-
{
94-
if(sampler < TEXTURE_IMAGE_UNITS)
95-
{
96-
context->sampler[sampler].setTextureFilter(textureFilter);
97-
}
98-
else ASSERT(false);
99-
}
100-
101-
void PixelProcessor::setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter)
102-
{
103-
if(sampler < TEXTURE_IMAGE_UNITS)
104-
{
105-
context->sampler[sampler].setMipmapFilter(mipmapFilter);
106-
}
107-
else ASSERT(false);
108-
}
109-
110-
void PixelProcessor::setGatherEnable(unsigned int sampler, bool enable)
111-
{
112-
if(sampler < TEXTURE_IMAGE_UNITS)
113-
{
114-
context->sampler[sampler].setGatherEnable(enable);
115-
}
116-
else ASSERT(false);
117-
}
118-
119-
void PixelProcessor::setAddressingModeU(unsigned int sampler, AddressingMode addressMode)
120-
{
121-
if(sampler < TEXTURE_IMAGE_UNITS)
122-
{
123-
context->sampler[sampler].setAddressingModeU(addressMode);
124-
}
125-
else ASSERT(false);
126-
}
127-
128-
void PixelProcessor::setAddressingModeV(unsigned int sampler, AddressingMode addressMode)
129-
{
130-
if(sampler < TEXTURE_IMAGE_UNITS)
131-
{
132-
context->sampler[sampler].setAddressingModeV(addressMode);
133-
}
134-
else ASSERT(false);
135-
}
136-
137-
void PixelProcessor::setAddressingModeW(unsigned int sampler, AddressingMode addressMode)
138-
{
139-
if(sampler < TEXTURE_IMAGE_UNITS)
140-
{
141-
context->sampler[sampler].setAddressingModeW(addressMode);
142-
}
143-
else ASSERT(false);
144-
}
145-
146-
void PixelProcessor::setReadSRGB(unsigned int sampler, bool sRGB)
147-
{
148-
if(sampler < TEXTURE_IMAGE_UNITS)
149-
{
150-
context->sampler[sampler].setReadSRGB(sRGB);
151-
}
152-
else ASSERT(false);
153-
}
154-
155-
void PixelProcessor::setMipmapLOD(unsigned int sampler, float bias)
156-
{
157-
if(sampler < TEXTURE_IMAGE_UNITS)
158-
{
159-
context->sampler[sampler].setMipmapLOD(bias);
160-
}
161-
else ASSERT(false);
162-
}
163-
164-
void PixelProcessor::setBorderColor(unsigned int sampler, const Color<float> &borderColor)
165-
{
166-
if(sampler < TEXTURE_IMAGE_UNITS)
167-
{
168-
context->sampler[sampler].setBorderColor(borderColor);
169-
}
170-
else ASSERT(false);
171-
}
172-
173-
void PixelProcessor::setMaxAnisotropy(unsigned int sampler, float maxAnisotropy)
174-
{
175-
if(sampler < TEXTURE_IMAGE_UNITS)
176-
{
177-
context->sampler[sampler].setMaxAnisotropy(maxAnisotropy);
178-
}
179-
else ASSERT(false);
180-
}
181-
182-
void PixelProcessor::setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering)
183-
{
184-
if(sampler < TEXTURE_IMAGE_UNITS)
185-
{
186-
context->sampler[sampler].setHighPrecisionFiltering(highPrecisionFiltering);
187-
}
188-
else ASSERT(false);
189-
}
190-
191-
void PixelProcessor::setSwizzleR(unsigned int sampler, SwizzleType swizzleR)
192-
{
193-
if(sampler < TEXTURE_IMAGE_UNITS)
194-
{
195-
context->sampler[sampler].setSwizzleR(swizzleR);
196-
}
197-
else ASSERT(false);
198-
}
199-
200-
void PixelProcessor::setSwizzleG(unsigned int sampler, SwizzleType swizzleG)
201-
{
202-
if(sampler < TEXTURE_IMAGE_UNITS)
203-
{
204-
context->sampler[sampler].setSwizzleG(swizzleG);
205-
}
206-
else ASSERT(false);
207-
}
208-
209-
void PixelProcessor::setSwizzleB(unsigned int sampler, SwizzleType swizzleB)
210-
{
211-
if(sampler < TEXTURE_IMAGE_UNITS)
212-
{
213-
context->sampler[sampler].setSwizzleB(swizzleB);
214-
}
215-
else ASSERT(false);
216-
}
217-
218-
void PixelProcessor::setSwizzleA(unsigned int sampler, SwizzleType swizzleA)
219-
{
220-
if(sampler < TEXTURE_IMAGE_UNITS)
221-
{
222-
context->sampler[sampler].setSwizzleA(swizzleA);
223-
}
224-
else ASSERT(false);
225-
}
226-
227-
void PixelProcessor::setCompareFunc(unsigned int sampler, CompareFunc compFunc)
228-
{
229-
if(sampler < TEXTURE_IMAGE_UNITS)
230-
{
231-
context->sampler[sampler].setCompareFunc(compFunc);
232-
}
233-
else ASSERT(false);
234-
}
235-
236-
void PixelProcessor::setBaseLevel(unsigned int sampler, int baseLevel)
237-
{
238-
if(sampler < TEXTURE_IMAGE_UNITS)
239-
{
240-
context->sampler[sampler].setBaseLevel(baseLevel);
241-
}
242-
else ASSERT(false);
243-
}
244-
245-
void PixelProcessor::setMaxLevel(unsigned int sampler, int maxLevel)
246-
{
247-
if(sampler < TEXTURE_IMAGE_UNITS)
248-
{
249-
context->sampler[sampler].setMaxLevel(maxLevel);
250-
}
251-
else ASSERT(false);
252-
}
253-
254-
void PixelProcessor::setMinLod(unsigned int sampler, float minLod)
255-
{
256-
if(sampler < TEXTURE_IMAGE_UNITS)
257-
{
258-
context->sampler[sampler].setMinLod(minLod);
259-
}
260-
else ASSERT(false);
261-
}
262-
263-
void PixelProcessor::setMaxLod(unsigned int sampler, float maxLod)
264-
{
265-
if(sampler < TEXTURE_IMAGE_UNITS)
266-
{
267-
context->sampler[sampler].setMaxLod(maxLod);
268-
}
269-
else ASSERT(false);
270-
}
271-
27292
void PixelProcessor::setWriteSRGB(bool sRGB)
27393
{
27494
context->setWriteSRGB(sRGB);

src/Device/PixelProcessor.hpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -149,33 +149,6 @@ namespace sw
149149
void setDepthBuffer(vk::ImageView *depthBuffer, unsigned int layer = 0);
150150
void setStencilBuffer(vk::ImageView *stencilBuffer, unsigned int layer = 0);
151151

152-
void setTexCoordIndex(unsigned int stage, int texCoordIndex);
153-
void setConstantColor(unsigned int stage, const Color<float> &constantColor);
154-
void setBumpmapMatrix(unsigned int stage, int element, float value);
155-
void setLuminanceScale(unsigned int stage, float value);
156-
void setLuminanceOffset(unsigned int stage, float value);
157-
158-
void setTextureFilter(unsigned int sampler, FilterType textureFilter);
159-
void setMipmapFilter(unsigned int sampler, MipmapType mipmapFilter);
160-
void setGatherEnable(unsigned int sampler, bool enable);
161-
void setAddressingModeU(unsigned int sampler, AddressingMode addressingMode);
162-
void setAddressingModeV(unsigned int sampler, AddressingMode addressingMode);
163-
void setAddressingModeW(unsigned int sampler, AddressingMode addressingMode);
164-
void setReadSRGB(unsigned int sampler, bool sRGB);
165-
void setMipmapLOD(unsigned int sampler, float bias);
166-
void setBorderColor(unsigned int sampler, const Color<float> &borderColor);
167-
void setMaxAnisotropy(unsigned int sampler, float maxAnisotropy);
168-
void setHighPrecisionFiltering(unsigned int sampler, bool highPrecisionFiltering);
169-
void setSwizzleR(unsigned int sampler, SwizzleType swizzleR);
170-
void setSwizzleG(unsigned int sampler, SwizzleType swizzleG);
171-
void setSwizzleB(unsigned int sampler, SwizzleType swizzleB);
172-
void setSwizzleA(unsigned int sampler, SwizzleType swizzleA);
173-
void setCompareFunc(unsigned int sampler, CompareFunc compare);
174-
void setBaseLevel(unsigned int sampler, int baseLevel);
175-
void setMaxLevel(unsigned int sampler, int maxLevel);
176-
void setMinLod(unsigned int sampler, float minLod);
177-
void setMaxLod(unsigned int sampler, float maxLod);
178-
179152
void setWriteSRGB(bool sRGB);
180153
void setDepthBufferEnable(bool depthBufferEnable);
181154
void setDepthCompare(VkCompareOp depthCompareMode);

0 commit comments

Comments
 (0)