Changes to ensure all supported texture tests are passing with the Metal backend and add additional tests to cover texture_3d and texture 1d test cases. Authored by Apple: Michael Parkin-White Co-authored-by: Michael Parkin-White <mparkinwhite@apple.com> Pull Request: https://projects.blender.org/blender/blender/pulls/113889
47 lines
1.6 KiB
C++
47 lines
1.6 KiB
C++
/* SPDX-FileCopyrightText: 2023 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*/
|
|
|
|
#include "gpu_shader_create_info.hh"
|
|
|
|
GPU_SHADER_INTERFACE_INFO(depth_2d_update_iface, "").smooth(Type::VEC2, "texCoord_interp");
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_info_base)
|
|
.vertex_in(0, Type::VEC2, "pos")
|
|
.vertex_out(depth_2d_update_iface)
|
|
.fragment_out(0, Type::VEC4, "fragColor")
|
|
.push_constant(Type::VEC2, "extent")
|
|
.push_constant(Type::VEC2, "offset")
|
|
.push_constant(Type::VEC2, "size")
|
|
.push_constant(Type::INT, "mip")
|
|
.depth_write(DepthWrite::ANY)
|
|
.vertex_source("depth_2d_update_vert.glsl");
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_float)
|
|
.metal_backend_only(true)
|
|
.fragment_source("depth_2d_update_float_frag.glsl")
|
|
.sampler(0, ImageType::FLOAT_2D, "source_data", Frequency::PASS)
|
|
.additional_info("depth_2d_update_info_base")
|
|
.do_static_compilation(true)
|
|
.depth_write(DepthWrite::ANY);
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_int24)
|
|
.metal_backend_only(true)
|
|
.fragment_source("depth_2d_update_int24_frag.glsl")
|
|
.additional_info("depth_2d_update_info_base")
|
|
.sampler(0, ImageType::INT_2D, "source_data", Frequency::PASS)
|
|
.do_static_compilation(true)
|
|
.depth_write(DepthWrite::ANY);
|
|
|
|
GPU_SHADER_CREATE_INFO(depth_2d_update_int32)
|
|
.metal_backend_only(true)
|
|
.fragment_source("depth_2d_update_int32_frag.glsl")
|
|
.additional_info("depth_2d_update_info_base")
|
|
.sampler(0, ImageType::INT_2D, "source_data", Frequency::PASS)
|
|
.do_static_compilation(true)
|
|
.depth_write(DepthWrite::ANY);
|