D3d11_usage enumeration (d3d11.h)

Remarks

Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call ID3D11Device::CreateRasterizerState. To set rasterizer state, call ID3D11DeviceContext::RSSetState.

If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.

State Default Value
FillMode Solid
CullMode Back
FrontCounterClockwise FALSE
DepthBias
SlopeScaledDepthBias 0.0f
DepthBiasClamp 0.0f
DepthClipEnable TRUE
ScissorEnable FALSE
MultisampleEnable FALSE
AntialiasedLineEnable FALSE

Note  For feature levels 9.1, 9.2, 9.3, and 10.0, if you set MultisampleEnable to FALSE, the runtime renders all points, lines, and triangles without anti-aliasing even for render targets with a sample count greater than 1. For feature levels 10.1 and higher, the setting of MultisampleEnable has no effect on points and triangles with regard to MSAA and impacts only the selection of the line-rendering algorithm as shown in this table:
 

Line-rendering algorithm MultisampleEnable AntialiasedLineEnable
Aliased FALSE FALSE
Alpha antialiased FALSE TRUE
Quadrilateral TRUE FALSE
Quadrilateral TRUE TRUE

The settings of the MultisampleEnable and AntialiasedLineEnable members apply only to multisample antialiasing (MSAA) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren’t performing any line drawing or don’t mind that lines render as quadrilaterals, we recommend that you always set MultisampleEnable to TRUE whenever you render on MSAA render targets.

Corporate settings

The D3D11InstallHelper sample is designed for standard deployment through Windows Update, which is the most common scenario for installation of a game by consumers. However, Many game developers, working for publishers and in development studios, do so in enterprise settings that have a locally managed server providing software updates by using Windows Server Update Services (WSUS) technology. In this type of environment, the local IT administrator has approval control over which updates are made available to computers within the corporate network, and the standard consumer version of update KB 971644 is not available.

There are three basic solutions for deploying DirectX 11 in corporate/enterprise settings:

  • In some configurations, it is possible to directly check Windows Update rather than use the locally managed WSUS server. For this reason, D3D11InstallHelper supports the /wu command-line switch. However, not all corporate networks allow connections to the public Microsoft servers.
  • The local IT administrator can approve KB 971512, an enterprise-supported update deployed from WSUS, that includes the Direct3D 11 API. This is the only option for a Standard User to obtain the Direct3D 11 update in an environment that is fully locked down.
  • Alternatively, KB 971512 can be manually installed.

It is very rare that a gamer’s computer can only get updates from a locally managed WSUS server, and it is only developers in large organizations who are likely to be in such environments.

Вычисление шейдера

Вычислительный шейдер — это программируемый шейдер, предназначенный для параллельной обработки данных общего назначения. Иными словами, шейдеры вычислений позволяют использовать графический процессор в качестве параллельного процессора общего назначения. Вычисление шейдера похоже на другие программируемые построители текстур (вершина, пиксельные и геометрические), способные получить доступ к входным и выходным данным. Технология вычислений с шейдером также называется технологией DirectCompute. Вычисление шейдера интегрировано в Direct3D и доступно через устройство Direct3D. Он может напрямую обмениваться ресурсами памяти с графическими шейдерами с помощью устройства Direct3D. Однако он не подключен напрямую к другим этапам шейдера.

Шейдер вычислений предназначен для массовых приложений, выполняющих вычисления на интерактивных тарифах, когда затраты на переход между API (и связанным программным стеком) и ЦП занимают слишком много ресурсов.

У шейдера вычислений есть собственный набор состояний. В шейдере вычислений не обязательно наличие принудительного сопоставления 1-1 для входных записей (например, шейдер вершин) или выходных записей (например, шейдер пикселей). Некоторые функции шейдера графики поддерживаются, но другие были удалены, поэтому можно добавлять новые функции для работы с шейдером вычислений.

Для поддержки функций, относящихся к шейдеру вычислений, теперь доступны несколько новых типов ресурсов, таких как буферы чтения и записи, текстуры и структурированные буферы.

Дополнительные сведения см. в разделе Общие сведения о COMPUTE Shader .

Как скачать D3D11.dll

В интернете можно найти бесчисленное число сайтов, которые предложат решить эту проблему. Часть из них выдаёт специальное приложение, которое само починит нужные проблемы, скачает и установит нужные библиотеки. На других сайтах будут советовать установить DirectX последней версии. Однако загрузить D3D11.dll можно иначе.

Способ 1: Скачать библиотечный файл

Поскольку компания Microsoft не выкладывает в общий доступ все файлы библиотек, их стараются найти на других сайтах. Подобных сайтов множество, но лучше всего стараться загрузить именно файл библиотеки, предварительно проверив, не является ли ресурс вирусным. В данной статье загрузка файла рассматривается на примере сайта dllme.com

Перейти на сайт dllme.com

Справа на главной странице можно найти строку поиска, где написано «Search .DLL files». Здесь нужно написать D3D11.dll и нажать на кнопку «Start Searching».

Среди результатов поиска нужно выбрать один из файлов, который иногда содержит краткое описание справа.

После нажатия на ссылку появится полное описание файла

Здесь необходимо обратить внимание на поле «Version», которое показывает, для какой версии Windows предназначена библиотека.

Перед самой загрузкой нужно ввести капчу.

Последний шаг загрузки — нужно нажать на ссылку «Click here to download your DLL».

Загруженный файл нужно извлечь в папку, в данном примере это системная папка «System32», где и располагаются системные библиотеки.

После этого нужно открыть командную строку и сначала написать regsvr32, затем перетащить файл в командную строку. В данном примере команда имеет такой вид:

Скорее всего, появится сообщение, что библиотека загружена, но точка входа не найдена

Поэтому после выполнения программы нужно перезагрузить компьютер.

Способ 2: Использование системного сканера файлов

Скачать D3D11.dll можно и с помощью встроенных инструментов. Часто бывает так, что проблема связана с несколькими файлами, и необязательно это только динамические библиотеки. Начиная с Windows 7, D3D11.dll входит в состав всех последующих операционных систем, поэтому утилита от Майкрософт скачает и восстановит её.

  1. Открыв командную строку, нужно написать:
  2. System file scanner проверит наличие всех библиотек, которые должны быть в системе, скачает и восстановит их. Это может занять продолжительное время, но по окончании операции утилита выдаст сообщение, что всё сделано.
  3. Чтобы убедиться в наличии библиотеки, достаточно открыть папку System32.

Заключение

Хотя существует множество способов, как можно скачивать библиотеки, лучше всего это делать штатными средствами. Так решается сразу несколько проблем и исключается вариант подхватить вирус с непроверенного ресурса.

Parameters

Type: IDXGIAdapter*

A pointer to the video adapter to use when creating a device. Pass NULL to use the default adapter, which is the first adapter enumerated
by IDXGIFactory1::EnumAdapters.

Note  Do not mix the use of DXGI 1.0 (IDXGIFactory) and DXGI 1.1 (IDXGIFactory1) in an application. Use IDXGIFactory or IDXGIFactory1, but not both in an application.

 

Type: D3D_DRIVER_TYPE

The D3D_DRIVER_TYPE, which represents the driver type to create.

Type: HMODULE

A handle to a DLL that implements a software rasterizer.
If DriverType is D3D_DRIVER_TYPE_SOFTWARE, Software must not be NULL. Get the handle by
calling LoadLibrary,
LoadLibraryEx ,
or GetModuleHandle. The value should be non-NULLwhen D3D_DRIVER_TYPE is D3D_DRIVER_TYPE_SOFTWARE and NULL otherwise.

Type: UINT

The runtime layers to enable (see D3D11_CREATE_DEVICE_FLAG);
values can be bitwise OR’d together.

Type: const D3D_FEATURE_LEVEL*

A pointer to an array of D3D_FEATURE_LEVELs, which determine the order of feature levels to attempt to create.
If pFeatureLevels is set to NULL,
this function uses the following array of feature levels:

Note  If the Direct3D 11.1 runtime is present on the computer and pFeatureLevels is set to NULL, this function won’t create a D3D_FEATURE_LEVEL_11_1 device. To create a D3D_FEATURE_LEVEL_11_1 device, you must explicitly provide a D3D_FEATURE_LEVEL array that includes D3D_FEATURE_LEVEL_11_1. If you provide a D3D_FEATURE_LEVEL array that contains D3D_FEATURE_LEVEL_11_1 on a computer that doesn’t have the Direct3D 11.1 runtime installed, this function immediately fails with E_INVALIDARG.

 

Type: UINT

The number of elements in pFeatureLevels.

Type: UINT

The SDK version; use D3D11_SDK_VERSION.

Type: const DXGI_SWAP_CHAIN_DESC*

A pointer to a swap chain description (see DXGI_SWAP_CHAIN_DESC) that contains initialization parameters for the swap chain.

Type: IDXGISwapChain**

Returns the address of a pointer to the IDXGISwapChain object that represents the swap chain used for rendering.

Type: ID3D11Device**

Returns the address of a pointer to an ID3D11Device object that represents the device created. If this parameter is NULL, no ID3D11Device will be returned’.

Type: D3D_FEATURE_LEVEL*

Returns a pointer to a D3D_FEATURE_LEVEL, which represents the first element in an array of feature levels supported
by the device. Supply NULL as an input if you don’t need to determine which feature level is supported.

Type: ID3D11DeviceContext**

Returns the address of a pointer to an ID3D11DeviceContext object that represents the device context. If this parameter is NULL, no ID3D11DeviceContext will be returned.

Remarks

For more information about D3DX11CompileFromFile, see D3DCompile.

You must supply NULL to the pHResult parameter if you also supply NULL to the pPump parameter. Otherwise, you cannot create a shader by using the compiled shader code that D3DX11CompileFromFile returns in the memory that the ppShader parameter points to. To create a shader from complied shader code, you call one of the following ID3D11Device interface methods:

  • CreateComputeShader
  • CreateDomainShader
  • CreateGeometryShader
  • CreateGeometryShaderWithStreamOutput
  • CreateHullShader
  • CreatePixelShader
  • CreateVertexShader

In addition, if you supply a non-NULL value to pHResult when you supply NULL to pPump, D3DX11CompileFromFile returns the E_INVALIDARG error code.

Решаем проблему

Существует сразу 2 способа исправить ситуацию и бесплатно установить d3d11.dll в систему Windows XP, Windows 7, Windows 8 или Windows 10. Первый вариант подразумевает загрузку и инсталляцию всего пакета DirectX, второй же – одного файла d3d11.dll. Рассмотрим оба метода подробнее.

Устанавливаем DirectX

Установка DirectX – это правильный способ. В отличие от загрузки одного d3d11.dll, он дает практически 100% положительный исход и, соответственно, успешный запуск игры. Что для этого нужно? Во-первых, скачать саму библиотеку с ее официального сайта, во-вторых, правильно ее установить. Ни с первым, ни со вторым сложностей возникать не будет – рассмотрим оба пункта.

  1. Скачиваем по прямой ссылке библиотеку DirectX (для вашего удобства мы загрузили последнюю версию с официального сайта Microsoft и разместили у себя). Запустите загруженный WEB-инсталлятор и примите условия лицензионного соглашения. Для этого установите флажок переключателя в позицию, обозначенную на скриншоте цифрой «1». Как только это будет сделано, кликаем по виртуальной клавише «Далее».
  1. В следующем окне отключите установку дополнительного программного обеспечения (в нашем случае это Bing панель) и нажмите «Далее».
  1. На этом установка окончена, нам остается только кликнуть по кнопке с надписью «Готово».

Теперь можно пробовать запускать игру.

Скачиваем и устанавливаем d3d11.dll

Существует и еще один способ заставить игрушку работать без установки DirectX. Мы можем просто отдельно скачать файл d3d11.dll и добавить его в системную папку. Однако такой вариант не дает стопроцентной гарантии того, что проблема будет решена, и игра запустится. Но, для полноты картины, давайте рассмотрим и этот способ.

Сначала скачаем сам d3ddll

Тут следует заострить ваше внимание. Дело в том, что официального файла не существует и, если вы попытаетесь найти его в сети, вероятность загрузить вирус на ПК будет практически стопроцентной

Мы извлекли компонент из библиотеки DirectX, скачанной с официального сайта Microsoft, и поместили его на свой сайт. Скачивайте файл по прямой ссылке и не беспокойтесь о «здоровье» вашего компьютера.
Теперь нужно поместить загруженную dll в системный каталог, причем в зависимости от разрядности. Для того чтобы проверить по какой архитектуре выполнена ваша операционная система, используйте сочетание «горячих клавиш» Win+PauseBreak. На скриншоте отмечен пункт, который требует внимания. В нашем случае это 64-bit Windows 10

  1. После того как вы узнали разрядность Windows, поместите d3ddll в C:\Windows\system32 если у вас x32-битная ОС, и в C:\Windows\sysWOW64 – если x64.
  1. Также копируйте файл и в каталог с игрой. Причем именно в ту папку, где содержатся исполняемые компоненты с расширением .exe.
  1. Осталось только зарегистрировать файлы. Одного добавления в папку, к сожалению, недостаточно. Открываем инструмент «Выполнить» (используйте сочетание клавиш Win+R) и вводим в окошко команду: regsvr32 d3ddll, затем жмем «ОК».

Данный вариант не дает гарантии успешного запуска игры. Например, зарегистрировать файл из-за отсутствия остальных компонентов удается далеко не всегда. В любом случае перезагрузите компьютер и попробуйте запустить игру.

Исправление ошибок D3D11

Причиной рассматриваемой ошибки могут быть различные факторы, самые распространенные из которых

  1. Ваша видеокарта не поддерживает DirectX 11 (при этом, нажав клавиши Win+R и введя dxdiag, вы можете там видеть, что установлена именно 11 или 12 версия. Однако, это ничего не говорит о том, что есть поддержка этой версии со стороны видеокарты — только о том, файлы данной версии установлены на компьютере). 
  2. Не установлены последние оригинальные драйверы на видеокарту — при этом начинающие пользователи часто пробуют обновить драйверы, используя кнопку «Обновить» в диспетчере устройств, это неправильный метод: сообщение о том, что «Драйвер не нуждается в обновлении» при данном способе обычно мало что означает.
  3. Не установлены необходимые обновления для Windows 7, что может приводить к тому, что даже при наличии DX11, файла d3d11.dll и поддерживаемой видеокарты, игры, наподобие Dishonored 2 продолжают сообщать об ошибке.

Добавить в заметки чтобы посмотреть позже?

Первые два пункта взаимосвязаны и в равной степени могут встречаться как у пользователей Windows 7, так и .

Правильным порядком действий при ошибках в данном случае будет:

Вручную скачать оригинальные драйверы видеокарты с официальных сайтов AMD, NVIDIA или Intel (см., например, Как установить драйверы NVIDIA в ) и установить их.
Зайти в dxdiag (клавиши Win+R, ввести dxdiag и нажать Enter), открыть вкладку «Экран» и в разделе «Драйверы» обратить внимание на поле «DDI для Direct3D». При значениях 11.1 и выше ошибки D3D11 появляться не должны

При меньших — скорее всего дело в отсутствии поддержки со стороны видеокарты или ее драйверов. Либо, в случае Windows 7, в отсутствии необходимого обновления платформы, о чем — далее. 

Также вы можете посмотреть отдельно установленную и поддерживаемую аппаратно версию DirectX в сторонних программах, например, в AIDA64 (см. Как узнать версию DirectX на компьютере).

Автор рекомендует прочесть:

В Windows 7 ошибки D3D11 и инициализации DirectX 11 при запуске современных игр могут появляться даже в тех случаях, когда необходимые драйверы установлены, а видеокарта не из старых. Исправить ситуацию можно следующим образом.

Cleaning up

In order to release a D3D11On12 wrapped resource, two things need to happen in this order:

  • All references to the resource, including any views of the resource, need to be released.
  • Deferred destruction processing must take place. The simplest way to ensure this happens is to invoke the immediate context API.

After both of those steps are completed, any references taken by the wrapped resource should be released, and the D3D12 resource becomes exclusively owned by the D3D12 component. Be aware that D3D12 still requires waiting for GPU completion before completely releasing a resource, so be sure to hold a reference on the resource before doing the two steps above, unless you’ve already confirmed that the GPU is no longer using the resource.

All other resources or objects created by D3D11On12 will be cleaned up at the appropriate time, when the GPU has finished using them, using D3D11’s deferred destruction mechanism. However if you attempt to release the D3D11On12 device itself while the GPU is still executing, the destruction may block until the GPU completes.

Members

Type: D3D11_FILL_MODE

Determines the fill mode to use when rendering (see D3D11_FILL_MODE).

Type: D3D11_CULL_MODE

Indicates triangles facing the specified direction are not drawn (see D3D11_CULL_MODE).

Type: BOOL

Determines if a triangle is front- or back-facing. If this parameter is TRUE, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If this parameter is FALSE, the opposite is true.

Type: INT

Depth value added to a given pixel. For info about depth bias, see Depth Bias.

Type: FLOAT

Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.

Type: FLOAT

Scalar on a given pixel’s slope. For info about depth bias, see Depth Bias.

Type: BOOL

Enable clipping based on distance.

The hardware always performs x and y clipping of rasterized coordinates. When DepthClipEnable is set to the default–TRUE, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm).

When you set DepthClipEnable to FALSE, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the «0 < w» clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane.

Type: BOOL

Enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.

Type: BOOL

Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing (MSAA) render targets. Set to TRUE to use the quadrilateral line anti-aliasing algorithm and to FALSE to use the alpha line anti-aliasing algorithm. For more info about this member, see Remarks.

Type: BOOL

Specifies whether to enable line antialiasing; only applies if doing line drawing and MultisampleEnable is FALSE. For more info about this member, see Remarks.

Overview

The Direct3D 11 API extends the existing Direct3D 10.1 API with support for multithreaded rendering and resource creation, Compute Shader, hardware tessellation, BC6H/BC7 texture compression, and HLSL Shader Model 5.0 with Dynamic Shader Linkage. In addition to the Direct3D 11 component, a number of additional graphics components are included in the DirectX 11 runtime: Direct3D 11, DXGI 1.1, 10level9 feature levels, WARP10 software rendering device, Direct2D, DirectWrite, and an updated Direct3D 10.1 with support for 10level9 and WARP10. For information on these and other Windows graphics components, see Graphics APIs in Windows.

All of these new graphics components are built into the Windows 7 and Windows Server 2008 R2 operating systems. The Direct3D 11 API and related components can also be installed on Windows Vista by using a system update from Windows Update; see Knowledge Base article KB 971644. This update requires Windows Vista and Service Pack 2. End-users with automatic updates enabled will, therefore, likely already have the Direct3D 11 components installed, as will all Windows 7 users.

The D3D11InstallHelper sample is designed to simplify detection of the Direct3D 11 API, automatically install the system update if applicable to an end-user’s computer, and to provide appropriate messages to the end-user on manual procedure if a newer Service Pack is required.

Note

The HLSL compiler (D3DCompile*.dll) and the D3DX utility library for Direct3D 11 (D3DX11*.dll) are not built into any version of the Windows operating system, but they can be deployed as part of an application’s installer by using the existing DirectSetup technology; for more information about using DirectSetup, see DirectX Installation for Game Developers. «Effects 11» is available as a shared source support library at Effects for Direct3D 11 Update, and you can include it directly into an app (much like the DXUT utility library). Thus, it doesn’t have any additional run-time redistribution requirements.

Limitations

The D3D11On12 layer implements a very large subset of the D3D11 API, but there are some known gaps (in addition to bugs in the implementation that can cause incorrect rendering).

As of Windows 10, version 1809 (10.0; Build 17763), as long as D3D11On12 is running on a driver that supports Shader Model 6.0 or later, then it can run shaders that use interfaces. In earlier versions of Windows, the shader interfaces feature is not implemented in D3D11On12, and attempting to use the feature will cause errors and debug messages.

As of Windows 10, version 1803 (10.0; Build 17134), swap chains are supported on D3D11On12 devices. In earlier versions of Windows, they are not.

D3D11On12 has not been optimized for performance. There will likely be moderate CPU overhead compared to a standard D3D11 driver, minimal GPU overhead, and there is known to be significant memory overhead. Therefore it is not recommended to use D3D11On12 for complicated 3D scenes, and it is instead recommended for simple scenes, or 2D rendering.

Способ 2: Установка DirectX 11

Изначально файл d3dx11_43.dll попадает в систему при установке DirectX 11. Этот пакет программного обеспечения должен идти с той игрой или программой, которая выдает ошибку, но по какой-то причине он не был инсталлирован или же пользователь ввиду незнания повредил нужный файл. В принципе, причина не важна. Для исправления ситуации понадобится установить DirectX 11, но для начала нужно загрузить инсталлятор этого пакета.

Для пользователей Windows 10 инструкция будет отличаться по той причине, что ДиректИкс и все его версии встроены в операционную систему, а значит, и добавляются/исправляются они вместе с системными обновлениями. Поэтому для вас у нас есть отдельное руководство.

Подробнее: Переустановка и добавление недостающих компонентов DirectX в Windows 10

У кого Windows 7 и ниже, алгоритм действий следующий:

Загрузив установщик DirectX на компьютер, запустите его и выполните следующее:

  1. Примите условия лицензии, отметив соответствующий пункт, после чего нажмите «Далее».

Выберите, устанавливать ли панель Bing в браузеры или нет, поставив галочку рядом с соответствующей строкой. После этого нажмите «Далее».

Подождите завершения инициализации, после чего нажмите «Далее».

Подождите завершения установки компонентов DirectX.

Нажмите «Готово».

Теперь DirectX 11 установлен в системе, следовательно, библиотека d3dx11_43.dll тоже.

Force the sample count to create a rasterizer state

Direct3D 11.1 lets you specify a force sample count when you create a rasterizer state.

This Direct3D 11.1 feature consists of the following API.

ID3D11Device1::CreateRasterizerState1

Note

If you want to render with the sample count forced to 1 or greater, you must follow these guidelines:

  • Don’t bind depth-stencil views.
  • Disable depth testing.
  • Ensure the shader doesn’t output depth.
  • If you have any render-target views bound (D3D11_BIND_RENDER_TARGET) and you forced the sample count to greater than 1, ensure that every render target has only a single sample.
  • Don’t operate the shader at sample frequency. Therefore, ID3D11ShaderReflection::IsSampleFrequencyShader returns FALSE.

Otherwise, rendering behavior is undefined. For info about how to configure depth-stencil, see Configuring Depth-Stencil Functionality.

d3d11.dll Dosya Özellikleri

Versiyon Bit Boyut Açıklama İşletim Sistemi Dosya
10.0.14393.0 64 Bit 837 KB Direct3D 11 Runtime Windows 10, 8.1, 8, 7, Vista, XP İndir
10.0.14393.0 32 Bit 671 KB Direct3D 11 Runtime Windows 10, 8.1, 8, 7, Vista, XP İndir

İşletim sistemi 32 bit olan kullanıcılar indirme sırasında indirdikleri DLL dosyasının 32 bit, 64 bit kullanıcılar ise 64 bit olarak indirdiklerine emin olması gerekmektedir. Bilgisayarınızdaki Windows sürümü 32 bit mi, yoksa 64 bit mi? bilmiyorsanız Windows Sürümüm 32 Bit mi, Yoksa 64 Bit mi? sayfasına girerek öğrenebilirsiniz.

sırasında anlatılan yöntemleri sırası ile paragraf, paragraf okuyunuz ve bilgisayarınızda anlatılan şekilde uygulayınız.

DLL uyarısını kaldıramayan kullanıcıların sıklıkla yapmış olduğu eksiklik, işlemleri okumamalarından kaynaklandığı gözlemlenmiştir. Sayfa içerisinde bulunan yöntemleri dikkatli olarak okumanızı, anlamadığınız işlemleri alanından sormanızı tavsiye ediyoruz.

Ошибка работы с функциями из внешних динамически загружаемых библиотек

Структуру библиотечных ресурсов операционной системы Windows можно представить следующим образом:

  • Сначала, на самом нижнем уровне, идут «прерывания» самой системы, «ноги» которых растут ещё с самых первых версий Windows, более того, всё от той давно почившей «старушки» MS-DOS (да, на этом уровне за 30 лет почти ничего в Windows и не изменилось). Доступ к этой библиотеке проще всего через ассемблер по команде INT (interrupt), отсюда и «прерывания», хотя на самом деле к подпрограммам обработки прерываний этот уровень имеет мало отношения.
  • Поднимаемся на шаг выше и мы попадаем в WinSDK – набор разработчика программного обеспечения от Windows. Это своеобразный аналог всё тех же «прерываний», но уже с учётом специфики организации Windows – разработчик получает доступ к этой библиотеке через привычный ему код используемого языка высокого уровня.

Единственная трудность – терминология описания WinSDK отличается от терминологии описания самого прикладного языка программирования, его функций (взять те же Builder или Delphi). Благо, все функции WinSDK подробно описаны в самих средах разработчиков (собственно, никакого отношения к ним не имеющих, настолько велика их популярность).

Функции WinSDK «собираются» в файлах динамически подключаемых (дословно – загружаемых) библиотек – dynamic load library (dll). Пользователю такой библиотеки нет необходимости знать адрес функции внутри – ему достаточно знать имя функции и иметь уверенность, что функция в библиотеке есть. Точки входов в функции определяются в описании самой библиотеки.

Ещё поднимаемся выше и мы в библиотеках программ-надстроек над Windows. Одной из самых известных надстроек является графический пакет DirectX. Здесь такая же организация – всё те же dll-файлы.

Вот с одной из библиотек DirectX и связана ошибка d3d11.dll – в ней хранятся функции отображения объёмных графических моделей.

Remarks

Note  If you call this method in a Session 0 process, it returns DXGI_ERROR_NOT_CURRENTLY_AVAILABLE.

 

To create a Direct3D 11.1 device (ID3D11Device1), which is available on Windows 8, Windows Server 2012, and Windows 7 and Windows Server 2008 R2 with the Platform Update for Windows 7 installed, you first create a ID3D11Device with this function, and then call the QueryInterface method on the ID3D11Device object to obtain the ID3D11Device1 interface.

To create a Direct3D 11.2 device (ID3D11Device2), which is available on Windows 8.1 and Windows Server 2012 R2, you first create a ID3D11Device with this function, and then call the QueryInterface method on the ID3D11Device object to obtain the ID3D11Device2 interface.

Also, see the remarks section in D3D11CreateDevice for details about input parameter dependencies. To create a device without
creating a swap chain, use the D3D11CreateDevice function.

If you set the pAdapter parameter to a non-NULL value, you must also set the DriverType parameter to the D3D_DRIVER_TYPE_UNKNOWN value. If you set the pAdapter parameter to a non-NULL value and the DriverType parameter to the D3D_DRIVER_TYPE_HARDWARE value, D3D11CreateDeviceAndSwapChain returns an HRESULT of E_INVALIDARG.

The function signature PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking.

Usage notes

Note  The D3D11CreateDeviceAndSwapChain function does not exist for Windows Store apps. Instead, Windows Store apps use the D3D11CreateDevice function and then use the IDXGIFactory2::CreateSwapChainForCoreWindow method.

 

Note  This function has not been updated to support recent additional features of swap chain creation. For the most up-to-date swap chain creation methods, refer to the methods of IDXGIFactory2 (including CreateSwapChainForHwnd, CreateSwapChainForCoreWindow and CreateSwapChainForComposition).
 
Windows Phone 8:

Для чего нужен

Данный файл является компонентом мультимедийной библиотеки DirectX от Microsoft. Нужна данная dll-библиотека для обеспечения работоспособности разных 3D-игр и приложений, например, Sniper Elite v2, Assassins Creed 3 Black Flag, Sleeping Dogs и т. д. Благодаря эволюции DirectX, отрисовка графики в современных играх происходит все более качественно, быстро и при этом требует все меньше аппаратной производительности компьютера или ноутбука.

Понятное дело, что, если игра запускается, операционная система обращается к DirectX, а та, в свою очередь, к d3d11.dll. Обнаруживается, что файла попросту нет и в результате мы видим ошибку. Из-за чего же может отсутствовать данный компонент (драйвер)? Причин тому существует несколько. Например, если это пиратская игра, при добавлении в дистрибутив кряка, нужный компонент динамической библиотеки мог быть поврежден или удален. Также вирус, который тайно обосновался на ПК, способен удалять любые файлы, в том числе и нужные для запуска игр.

Parameters

pSrcFile

Type: LPCTSTR

The name of the file that contains the shader code. If the compiler settings require Unicode, the data type LPCTSTR resolves to LPCWSTR. Otherwise, the data type resolves to LPCSTR.

pDefines

Type: const D3D10_SHADER_MACRO*

Optional. Pointer to an array of macro definitions (see D3D10_SHADER_MACRO). The last structure in the array serves as a terminator and must have all members set to 0. If not used, set pDefines to NULL.

pInclude

Type: LPD3D10INCLUDE

Optional. Pointer to an interface for handling include files. Setting this to NULL will cause a compile error if a shader contains a #include.

pFunctionName

Type: LPCSTR

Name of the shader-entry point function where shader execution begins. When you compile an effect, D3DX11CompileFromFile ignores pFunctionName; we recommend that you set pFunctionName to NULL because it is good programming practice to set a pointer parameter to NULL if the called function will not use it.

pProfile

Type: LPCSTR

A string that specifies the shader model; can be any profile in shader model 2, shader model 3, shader model 4, or shader model 5. The profile can also be for effect type (for example, fx_4_1).

Flags1

Type: UINT

Shader compile flags.

Flags2

Type: UINT

Effect compile flags. When you compile a shader and not an effect file, D3DX11CompileFromFile ignores Flags2; we recommend that you set Flags2 to zero because it is good programming practice to set a nonpointer parameter to zero if the called function will not use it.

pPump

Type: ID3DX11ThreadPump*

A pointer to a thread pump interface (see ID3DX11ThreadPump Interface). Use NULL to specify that this function should not return until it is completed.

ppShader

Type: ID3D10Blob**

A pointer to memory which contains the compiled shader, as well as any embedded debug and symbol-table information.

ppErrorMsgs

Type: ID3D10Blob**

A pointer to memory which contains a listing of errors and warnings that occurred during compilation. These errors and warnings are identical to the debug output from a debugger.

pHResult

Type: HRESULT*

A pointer to the return value. May be NULL. If pPump is not NULL, then pHResult must be a valid memory location until the asynchronous execution completes.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector