Concurrency::graphics::direct3d 命名空间函数
get_sampler
在表示指定采样器对象的给定加速器视图上获取 D3D 采样器状态接口。
IUnknown* get_sampler(
const Concurrency::accelerator_view& _Av,
const sampler& _Sampler) restrict(amp);
参数
_Av
要在其中创建 D3D 采样器状态的 D3D 加速器视图。
_Sampler
要为其创建基础 D3D 采样器状态接口的采样器对象。
返回值
一个 IUnknown 接口指针,它对应于表示给定采样器的 D3D 采样器状态。
get_texture
获取指定的 texture 对象所基于的 Direct3D 纹理接口。
template<
typename value_type,
int _Rank
>
_Ret_ IUnknown *get_texture(
const texture<value_type, _Rank>& _Texture) restrict(cpu);
template<
typename value_type,
int _Rank
>
_Ret_ IUnknown *get_texture(
const writeonly_texture_view<value_type, _Rank>& _Texture) restrict(cpu);
template<
typename value_type,
int _Rank
>
_Ret_ IUnknown *get_texture(
const texture_view<value_type, _Rank>& _Texture) restrict(cpu);
参数
value_type
纹理的元素类型。
_Rank
纹理的排名。
_Texture
一个纹理或纹理视图,它与要为其返回基础 Direct3D 纹理接口的 accelerator_view 关联。
返回值
一个 IUnknown 接口指针,它对应于纹理所基于的 Direct3D 纹理。
make_sampler
通过 D3D 采样器状态接口指针创建采样器。
sampler make_sampler(_In_ IUnknown* _D3D_sampler) restrict(amp);
参数
_D3D_sampler
要从中创建采样器的 D3D 采样器状态的 IUnknown 接口指针。
返回值
一个采样器,它表示提供的 D3D 采样器状态。
make_texture
使用指定的参数创建一个纹理对象。
template<
typename value_type,
int _Rank
>
texture<value_type, _Rank> make_texture(
const Concurrency::accelerator_view& _Av,
_In_ IUnknown* _D3D_texture,
DXGI_FORMAT _View_format = DXGI_FORMAT_UNKNOWN) restrict(cpu);
参数
value_type
纹理中元素的类型。
_Rank
纹理的排名。
_Av
要在其上创建纹理的 D3D 加速器视图。
_D3D_texture
要从中创建纹理的 D3D 纹理的 IUnknown 接口指针。
_View_format
用于从此纹理创建的视图的 DXGI 格式。 传递 DXGI_FORMAT_UNKNOWN(默认值),通过 _D3D_texture 的基础格式和此模板的 value_type 派生格式。 所提供的格式必须与 _D3D_texture 的基础格式兼容。
返回值
使用提供的 D3D 纹理的纹理。
msad4
比较 4 字节的引用值和 8 字节的源值并累加 4 个和的向量。 每个和对应于引用值与源值之间不同字节对齐的绝对差异的掩码总和。
inline uint4 msad4(
uint _Reference,
uint2 _Source,
uint4 _Accum) restrict(amp);
参数
_Reference
一个 uint 值中 4 字节的引用数组
_Source
两个 uint 值的向量中 8 字节的源数组。
_Accum
一个 4 值向量,它添加到引用值与源值之间不同字节对齐的绝对差异的掩码总和。
返回值
返回 4 个和的向量。 每个和对应于引用值与源值之间不同字节对齐的绝对差异的掩码总和。
要求
标头:amp_graphics.h
命名空间:Concurrency::graphics::direct3d