Fix MSVC C1001 error after texture sampler refactor

This patch fixes the MSVC C1001 error that was introduced after
ff3b2226fb.

Pull Request: https://projects.blender.org/blender/blender/pulls/106554
This commit is contained in:
Omar Emara
2023-04-04 18:20:44 +02:00
committed by Omar Emara
parent 412b6a8f65
commit 1ae54bb4fd
2 changed files with 8 additions and 5 deletions

View File

@@ -361,6 +361,10 @@ void DepthOfField::tiles_dilate_pass_sync()
void DepthOfField::gather_pass_sync()
{
const GPUSamplerState gather_bilinear = {GPU_SAMPLER_FILTERING_MIPMAP |
GPU_SAMPLER_FILTERING_LINEAR};
const GPUSamplerState gather_nearest = {GPU_SAMPLER_FILTERING_MIPMAP};
for (int pass = 0; pass < 2; pass++) {
PassSimple &drw_pass = (pass == 0) ? gather_fg_ps_ : gather_bg_ps_;
SwapChain<TextureFromPool, 2> &color_chain = (pass == 0) ? color_fg_tx_ : color_bg_tx_;
@@ -429,6 +433,10 @@ void DepthOfField::scatter_pass_sync()
void DepthOfField::hole_fill_pass_sync()
{
const GPUSamplerState gather_bilinear = {GPU_SAMPLER_FILTERING_MIPMAP |
GPU_SAMPLER_FILTERING_LINEAR};
const GPUSamplerState gather_nearest = {GPU_SAMPLER_FILTERING_MIPMAP};
hole_fill_ps_.init();
inst_.sampling.bind_resources(&hole_fill_ps_);
hole_fill_ps_.shader_set(inst_.shaders.static_shader_get(DOF_GATHER_HOLE_FILL));

View File

@@ -44,11 +44,6 @@ class DepthOfField {
private:
class Instance &inst_;
/** Samplers */
static constexpr GPUSamplerState gather_bilinear = {GPU_SAMPLER_FILTERING_MIPMAP |
GPU_SAMPLER_FILTERING_LINEAR};
static constexpr GPUSamplerState gather_nearest = {GPU_SAMPLER_FILTERING_MIPMAP};
/** Input/Output texture references. */
GPUTexture *input_color_tx_ = nullptr;
GPUTexture *output_color_tx_ = nullptr;