/// <summary> /// Sets the current texture sampler pool to be used. /// </summary> /// <param name="gpuVa">Start GPU virtual address of the pool</param> /// <param name="maximumId">Maximum ID of the pool (total count minus one)</param> /// <param name="samplerIndex">Type of the sampler pool indexing used for bound samplers</param> public void SetSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex) { _samplerPoolGpuVa = gpuVa; _samplerPoolMaximumId = maximumId; _samplerIndex = samplerIndex; _samplerPool = null; }
/// <summary> /// Sets the current texture sampler pool to be used. /// </summary> /// <param name="gpuVa">Start GPU virtual address of the pool</param> /// <param name="maximumId">Maximum ID of the pool (total count minus one)</param> /// <param name="samplerIndex">Type of the sampler pool indexing used for bound samplers</param> public void SetSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex) { ulong address = _context.MemoryManager.Translate(gpuVa); if (_samplerPool != null) { if (_samplerPool.Address == address && _samplerPool.MaximumId >= maximumId) { return; } _samplerPool.Dispose(); } _samplerPool = new SamplerPool(_context, address, maximumId); _samplerIndex = samplerIndex; }
/// <summary> /// Sets the current texture sampler pool to be used. /// </summary> /// <param name="gpuVa">Start GPU virtual address of the pool</param> /// <param name="maximumId">Maximum ID of the pool (total count minus one)</param> /// <param name="samplerIndex">Type of the sampler pool indexing used for bound samplers</param> public void SetSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex) { if (gpuVa != 0) { ulong address = _channel.MemoryManager.Translate(gpuVa); if (_samplerPool != null && _samplerPool.Address == address && _samplerPool.MaximumId >= maximumId) { return; } _samplerPool?.Dispose(); _samplerPool = new SamplerPool(_context, _channel.MemoryManager.Physical, address, maximumId); } else { _samplerPool?.Dispose(); _samplerPool = null; } _samplerIndex = samplerIndex; }
/// <summary> /// Sets the current sampler pool on the graphics pipeline. /// </summary> /// <param name="gpuVa">The start GPU virtual address of the sampler pool</param> /// <param name="maximumId">The maximum ID of the sampler pool</param> /// <param name="samplerIndex">The indexing type of the sampler pool</param> public void SetGraphicsSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex) { _gpBindingsManager.SetSamplerPool(gpuVa, maximumId, samplerIndex); }
/// <summary> /// Sets the current sampler pool on the compute pipeline. /// </summary> /// <param name="gpuVa">The start GPU virtual address of the sampler pool</param> /// <param name="maximumId">The maximum ID of the sampler pool</param> /// <param name="samplerIndex">The indexing type of the sampler pool</param> public void SetComputeSamplerPool(ulong gpuVa, int maximumId, SamplerIndex samplerIndex) { _cpBindingsManager.SetSamplerPool(gpuVa, maximumId, samplerIndex); }