P4 to Git Change 1136253 by gandryey@gera-w8 on 2015/03/31 12:51:46

ECR #304775 - Mipmaps support in OCL
	- Add changes for the sampler usage with mipmaped images

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_sampler.cpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#504 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#141 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#113 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.h#46 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/sampler.hpp#7 edit
This commit is contained in:
foreman
2015-03-31 13:06:05 -04:00
parent 9bff526ef0
commit 11dbd14b90
5 changed files with 79 additions and 20 deletions
@@ -1726,7 +1726,8 @@ CALGSLDevice::fillImageHwState(gslMemObject mem, void* hwState, uint32 hwStateSi
}
void
CALGSLDevice::fillSamplerHwState(bool unnorm, uint32 min, uint32 mag, uint32 addr, void* hwState, uint32 hwStateSize) const
CALGSLDevice::fillSamplerHwState(bool unnorm, uint32 min, uint32 mag, uint32 addr,
float minLod, float maxLod, void* hwState, uint32 hwStateSize) const
{
amd::ScopedLock k(gslDeviceOps());
m_textureSampler->setUnnormalizedMode(m_cs, unnorm);
@@ -1735,6 +1736,8 @@ CALGSLDevice::fillSamplerHwState(bool unnorm, uint32 min, uint32 mag, uint32 add
m_textureSampler->setWrap(m_cs, GSL_TEXTURE_WRAP_S, static_cast<gslTexParameterParamWrap>(addr));
m_textureSampler->setWrap(m_cs, GSL_TEXTURE_WRAP_T, static_cast<gslTexParameterParamWrap>(addr));
m_textureSampler->setWrap(m_cs, GSL_TEXTURE_WRAP_R, static_cast<gslTexParameterParamWrap>(addr));
m_textureSampler->setMinLOD(m_cs, static_cast<float32>(minLod));
m_textureSampler->setMaxLOD(m_cs, static_cast<float32>(maxLod));
m_textureSampler->getSamplerSrd(m_cs, hwState, hwStateSize);
}
@@ -126,7 +126,8 @@ public:
void fillImageHwState(gslMemObject mem, void* hwState, uint32 hwStateSize) const;
void fillSamplerHwState(bool unnorm, uint32 min, uint32 mag, uint32 addr, void* hwState, uint32 hwStateSize) const;
void fillSamplerHwState(bool unnorm, uint32 min, uint32 mag, uint32 addr,
float minLod, float maxLod, void* hwState, uint32 hwStateSize) const;
gslSamplerObject txSampler() const { return m_textureSampler; }