Arma 3 (107410) DX11 Error: E_INVALIDARG #3004
Comments
RookySoap commented Aug 23, 2019
Compatibility Report
- Name of the game with compatibility issues: Arma 3
- Steam AppID of the game: 107410
System Information
- GPU: GTX 970
- Driver/LLVM version: NVIDIA 418.56
- Kernel version: 5.0.0-25-Generic
- Link to full system information report as Gist:
- Proton version: 4.2-9
I confirm:
- that I haven’t found an existing compatibility report for this game.
- that I have checked whether there are updates for my system available.
Symptoms
Hello! I’m running Arma 3 on Ubuntu 19.04 with Proton 4.2-9, and it works fairly well other than crashing every so often with the message
«DX11 error: CreateTexture failed: E_INVALIDARG»
Sometimes it says «CreateBuffer failed» or «CreateTexture2D failed» but it always has the «E_INVALIDARG»
The error often happens when placing things in the editor, but also happens walking around in game when it has to draw new textures. It doesn’t seem to be any specific texture that the game doesn’t like, it’s more random.
The error is not mod-related as the crash happens with or without any mods enabled. Graphics settings do not seem to affect the crash either.
I’ve tried running with all of the other Proton versions available in the menu (3.7-8, 3.16-9, 4.11-2). They don’t seem to affect the error.
There’s another (unimportant) issue that might be related. About 1/5 of the time the game is launched, it puts out this loud, continuous beep until the game is closed. Probably not helpful, though.
I’ve tried reinstalling the game several times, but the issue has persisted over a few weeks.
Usually, the game last about 10 minutes before crashing, but several times I’ve left it open for a few hours and it never crashed. I wasn’t doing anything different with the game in those cases.
I don’t think it’s a memory thing, as my RAM doesn’t fill up and VRAM hovers around 98%-100% without seeming to trigger a crash.
I looked online for the error message. It seems a few people have gotten the error but only in specific circumstances like streaming video in game and with somebody’s mod. If you know any way to fix it, it would be much appreciated. Thank you!
Or maybe my computer is just haunted.
Reproduction
Not quite sure — in my case, just running the game and waiting until some texture loads that crashes the game.
The text was updated successfully, but these errors were encountered:
Источник
Dx11 error createbuffer failed
I get the following error after launching a game in the inn/lobby. I just bought this game and cannot play any level .
update_raw_buffer: CreateBuffer failed. HRESULT: 2289696773=DXGI_ERR_R_DEVICE_REMOVED: GetDeviceRemovedReason() = DXGI_ERROR_DEVICE_RESET
GUID: b2e17fe3-2572-4d6f-993f-2a677630b871
Log File: C:UserstimAppDataLocalTemp2017-02-13-20.11.15-0mbgxhk1.ske.zip
Info Type: Vermintide/LL/CL/CD
————————————————
[Engine Error]: update_raw_buffer: CreateBuffer failed. HRESULT: 2289696773=DXGI_ERROR_DEVICE_REMOVED: GetDeviceRemovedReason() = DXGI_ERROR_DEVICE_RESET
GUID: 067b5c07-ad96-45b8-bf20-572fa0aa0cd7
Log File: C:UsersMariachiAppDataLocalTemp2017-02-19-04.23.53-xvlzv1oi.3zw.zip
Info Type: Vermintide/LL/CL/CD
————————————————
[Engine Error]: update_raw_buffer: CreateBuffer failed. HRESULT: 2289696773=DXGI_ERROR_DEVICE_REMOVED: GetDeviceRemovedReason() = DXGI_ERROR_DEVICE_HUNG
This Is bloody frustrating.
Any fix on this yet. I just bought the game and i cant play it.
I have the latest drivers. whats the fix?
Clear install. Check ALL vide related software, directx, etc. Remove all conflicting not used drivers, etc. Also check ifg your integrated GPU is enabled, it can make this error. too.
In any case — it is issue with your hardware/software.
This game worked flawlessly for nearly a year now (level 150+). After the last update, I cannot finish a single game before getting this error.
I’ve tried:
— everything suggested on their support page: http://helpdesk.fatshark.se/helpdesk/KB/View/3574598-dxgierrordeviceremoved-dxgierrordevicehung
— uninstalling, resintalling, verifying integrity the game
— updating, deleting, reinstalling, rolling back nVidia drivers
— updating Direct X
— setting graphics to lowest settings
After an internet search, I found this to be quite a common issue, but found no solutions that work for me. I opened a FatShark support ticket several days ago with no response. So I’m reaching out to the community.
«Fatal Error!» message:
update_vertex_buffer: CreateBuffer failed. HRESULT:
2289696773=DXGI_ERROR_DEVICE_REMOVED:
GetDeviceRemovedReason()=DXGI_ERROR_DEVICE_RESET
Assertion failed ‘!FAILED(hr)’ at
‘C:BuildAgentwork1358eaafe6731564runtimed3d11_render_deviced3d_geometry.cpp:206’
EVERY OTHER GAME IN MY STEAM LIBRARY WORKS PERFECTLY.
Any one get these errors and was able to resolve? If so, how? Thanks much.
Источник
Dx11 error createbuffer failed
Dear developers — Please correct the problem! THE GAME IS NOT POSSIBLE TO CHANGE the settings. The game crashes with a DirectX11 error and then it’s impossible to enter.
Early access in this case is your personal excuse since before this update everything worked.
I found a temporary solution to fix the problem. You need to go to the folder
% USERNAME% Appdata Local SCUM Saved Config WindowsNoEditor
and delete the file — GameUserSettings.ini.
Next, without closing the window — run the game and see that the file was created again — delete it.
Change the sound settings and graphics for those that you need and see how the file was created again. Now this is the right file and with it the game will work.
I hope my advice helped you.
I found a temporary solution to fix the problem. You need to go to the folder
% USERNAME% Appdata Local SCUM Saved Config WindowsNoEditor
and delete the file — GameUserSettings.ini.
Next, without closing the window — run the game and see that the file was created again — delete it.
Change the sound settings and graphics for those that you need and see how the file was created again. Now this is the right file and with it the game will work.
Источник
Dx11 error createbuffer failed
Path of Exile
Upon hitting the start button on steam I am getting this:
CreateBuffer: The Parameter is incorrect.
Does anyone know how to fix this error??
Any assistance would be AWESOME.
What video card are you running and what OS are you running? I suspect that you might be running Win10 and have a card that does not support DX11/12.
Easy way to figure out is by running dxdiag and seeing what feature level your card supports.
If your card does not support the DX for your windows you can change the renderer to vulkan by:
production_Config in your PoE folder, then ctrl-f to find «renderer_type» and remove «DirectX» and put in «Vulkan».
What video card are you running and what OS are you running? I suspect that you might be running Win10 and have a card that does not support DX11/12.
Easy way to figure out is by running dxdiag and seeing what feature level your card supports.
If your card does not support the DX for your windows you can change the renderer to vulkan by:
production_Config in your PoE folder, then ctrl-f to find «renderer_type» and remove «DirectX» and put in «Vulkan».
Источник
Dx11 error createbuffer failed
Please contact us if you have any trouble resetting your password.
Quote:
Marshal.SizeOf(typeof(test_buff)) returns 8 as it supposed to be in this case
Quote: Original post by sirob
You’ve said it yourself:
Quote:
Marshal.SizeOf(typeof(test_buff)) returns 8 as it supposed to be in this case
So, 8 * 1024 = 8192 which is certainly above the upper allowed limit of 2048, which is stated in the error message. Looks like your buffer is simply too large.
Thanks for your reply.
Well I thought so too in the first place, tried changing that value any other value so that the whole buffer size would be smaller than 2048 and it still gives me the same error. It facts it works fine in the BasicCompute11 SDK sample with 1024 multiplied by 8 (struct size) so it shouldn’t be a problem here.
It seems like compiler complains about StructureByteStride value and not the whole buffer size.
Источник
Hey all, just got the Alpha today and have to first thank BIS for a wonderful job, even for an alpha. I have a lot to get use to in the way of controls with the stances and stuff, but that aside I love ArmA 3….well…what little I’ve experienced that is. I posted added feedback for the only ticket I’ve seen for this [ http://feedback.arma3.com/view.php?id=579
], but hoping in the meantime I can see if anyone else has been dealing with this issue and if so if there’s any get-around’s.
Basically, ArmA 3 decides to randomly crash completely and pop up a box that says:
DX11 error: buffer Map failed: DXGI_ERROR_DEVICE_REMOVED
I believe there are occasions when my Nvidia drivers crash as well with this sometimes. I’ve read one «cure» was to uninstall ZoneAlarm, but I don’t have it to begin with. I did have MSI Afterburner and removed it, but still had the issue. I had the latest Nvidia drivers so I tried reverting to an older December version, and that didn’t help. Uninstalled and reinstalled PhysX and that didn’t help. Tried running as admin, lowering graphics, etc. All of which did not help at all. I’m pretty much at a loss right now, because I have friends that have pretty close specs as I do and either the same older driver or newer ones (again I’ve had both) and have no issues.
I have a core i7, 8GB ram, 1GB GTX 570, ArmA 3 on my SSD and pretty much meet and/or exceed System Requirements Lab’s results for the Alpha. If I can get around this DXGI thing, I could live with the random crash when trying to launch it and whatever else comes my way. I just hate when I get in and just about getting into the game that this crash pop’s up. All I need is for it to have a picture of Tard saying «ArmA crashed? Good!» lol
So if anyone else out there (who happens to not have ZoneAlarm too) and has this, please chime in. I know this is not a good replacement to the tracker, but I’m hoping there might be more out there suffering with this headache and also help vote up so we can get some sort of official fix eventually found.
By the by: I have uploaded and linked to both my rpt/dump files and complete DXDiag uploaded to my Mediafire account via the tracker, in case if some of the more technically-minded individuals on here would like to skim through and maybe help track down just what the hell kind of gremlin is pissing on my ArmA 3 Alpha parade, lol. :p
Edited March 6, 2013 by Yokhanan
Ошибка DirectX – далеко не редкое явление. Эти библиотеки весьма чувствительны к драйверам, настройкам операционной системы и прочим штукам. Поэтому сбои случаются довольно часто. И нужно знать все о том, как им противостоять. Рассмотрим самые популярные ситуации.
Содержание
- Устранение неполадок
- DirectX function device CreateTexture2D
- Unable to create DirectX 11 device
- The Launcher cannot query DirectX
- DirectX function device createbuffer
- Не удается создать устройство DirectX
- DirectX encountered an unrecoverable error
- Your graphics card does not support DirectX 11 features
- Заключение
Устранение неполадок
В данном материале мы рассмотрим те сбои ДиректХ, которые встречаются чаще всего в повседневной жизни. Естественно, мы расскажем и о том, как их исправить. Но в тексте будет много сложного. Так что внимательно читайте инструкции.
DirectX function device CreateTexture2D
Если появляется ошибка «DirectX function device CreateTexture2D», то, вероятнее всего, виноваты драйвера видеокарты. Бывает так, что в старых драйверах не хватает куска кода, который требуется для нормальной работы видеокарты с той или иной версией библиотеки. Это случается из-за недосмотра разработчиков. Однако в новых версиях ПО ошибка может быть устранена.
Для обновления драйвера вовсе не обязательно посещать официальный сайт разработчика, скачивать нужную версию драйвера и устанавливать ее вручную. Гораздо проще и безопаснее использовать для обновления инструменты Windows.
Также этот шаг помогает со сбоем Fatal DirectX Error.
Сейчас мы рассмотрим вариант обновления с помощью «Диспетчера устройств» Windows:
- Щелкаем по кнопке «Пуск» правой кнопкой мыши и дожидаемся появления контекстного меню.
- В меню ищем «Диспетчер устройств» и нажимаем на этот пункт.
- Появится окно со списком установленного оборудования. Ищем «Видеоадаптеры» и щелкаем по данной записи.
- Находим имя своей видеокарты и щелкаем по нему правой кнопкой мыши.
- В контекстном меню выбираем «Обновить драйвер».
- Запустится мастер обновления. Необходимо щелкнуть по кнопке «Автоматический поиск драйверов в сети».
По завершении обновления необходимо перезагрузить компьютер. Только после рестарта система сможет инициализировать новый драйвер и начать его использовать. После рестарта можно пробовать запускать проблемную игру. Если ошибка все еще остается, то стоит попробовать еще один вариант.
Unable to create DirectX 11 device
А вот ошибка «Unable to create DirectX 11 device», наоборот, может появиться после обновления драйвера, если в его коде есть какой-то баг. Если это сбой обнаружился только после обновления, то это значит, что в новой версии ПО присутствует какой-то баг, мешающий нормальной работе графического адаптера и системных библиотек.
Откат также осуществляется при помощи встроенных инструментов операционной системы Windows. Но для его осуществления требуются немного другие шаги, чем для обновления драйвера. Впрочем, мы в любом случае предоставим подробную инструкцию, рассказывающую о данном процессе. Вот она:
- Опять переходим раздел «Видеоадаптеры» в «Диспетчере задач».
- Теперь необходимо найти имя нашей графической карты и кликнуть по ней правой кнопкой мыши.
- В появившемся меню просто выбираем «Свойства».
- Перемещаемся на вкладку «Драйвер».
- Нажимаем на кнопку «Откатить».
- Подтверждаем действие путем нажатия на кнопку «ОК».
Как водится, после работы с драйверами обязательно нужно перезагрузить компьютер. Иначе система просто не увидит другой драйвер и попытается работать со старым, что приведет к падению ОС. После рестарта можно проверять игру на наличие ошибок. Если и этот вариант не помог, то у нас в запасе есть еще несколько.
The Launcher cannot query DirectX
Весьма часто в окошке с ошибкой появляется текст The Launcher cannot query DirectX в L.A Noire. Что делать в этом случае? Вероятнее всего, на компьютере хозяйничают вирусы. Именно из-за них может получиться такой казус. И это еще не предел. Огромное количество вирусов на компьютере вполне может повесить всю ОС. Так что стоит воспользоваться каким-либо антивирусом, чтобы проверить компьютер
Еще одно решение – обновление компонента Microsoft .NET Framework до версии 4.7.1:
- Откройте эту ссылку.
- Кликните по кнопке «Скачать».
- Дождитесь завершения загрузки.
- Теперь запустите полученный файл.
- Выполните инсталляцию компонента.
DirectX function device createbuffer
Для появления ошибки «DirectX function device createbuffer» тоже имеется свое объяснение. Если на вашем компьютере находились полчища вирусов, то вполне вероятно, что они могли повредить некоторые системные файлы, ответственные за работу библиотек DirectX. Отсюда и постоянные ошибки при запуске той или иной игрушки. Также могут возникнуть конфликты в работе драйверов и компонентов библиотек.
Однако даже если файлы сильно повреждены, есть возможность вернуть все на круги своя. Для восстановления элементов даже не нужно никаких дополнительных программ. Достаточно командной строки. Бояться ее не стоит. Если все выполнять в строгом соответствии с инструкцией, то ничего страшного не случится. А вот и она:
- Открываем меню «Пуск» при помощи соответствующей кнопки в панели задач.
- Далее щелкаем по папке «Служебные».
- Находим пункт «Командная строка» и кликаем по нему правой кнопкой мыши.
- Появится меню, в котором нужно выбрать опцию «Запуск от имени администратора».
- В главном окне консоли вводим sfc /scannow и жмем на кнопку Enter.
Проверка файлов и их восстановление займет около 10-15 минут. Не забудьте, что после окончания проверки обязательно нужно будет перезагрузить компьютер. Иначе в восстановлении не будет никакого толку. После рестарта можно проверять работоспособность библиотек DirectX и любимой игрушки. Если это не помогло, то остается всего один вариант.
Не удается создать устройство DirectX
Если «Не удается создать устройство DirectX», то такое поведение может быть также связано с работой антивируса или системного брандмауэра. Эти программы любят блокировать все подряд. Даже несмотря на то, что перед ними вовсе не вредоносный объект. Вероятно, они блокируют и некоторые компоненты библиотек Директ Икс.
Самым правильным шагом будет временное отключение защиты. Достаточно это сделать для антивируса. Просто найдите его иконку в трее Windows, кликните по ней ПКМ и выберите соответствующую опцию.
DirectX encountered an unrecoverable error
При появлении ошибки с текстом «DirectX encountered an unrecoverable error» остается только одно – переустановка. Ведь, вероятнее всего, вирусы повредили какие-то файлы самих библиотек. Поэтому и появляются ошибки такого типа. И именно поэтому видеокарта не может нормально работать с DirectX. Если это действительно так, то приятного в этом мало.
Здесь поможет только полная переустановка компонента. Данная процедура очень простая в исполнении, ведь от пользователя требуется просто скачать и запустить специальную утилиту. Подробности о ней изложены в отдельной статье, с которой мы и предлагаем вам ознакомиться. Это же действие нередко спасает и при сбое DirectX error 0x887a0004.
Your graphics card does not support DirectX 11 features
Некоторые ошибки указывают на аппаратную проблему. Да, именно на ту, которая связана с железом компьютера. И здесь мы вряд ли что-нибудь сможем сделать.
Ошибка с текстом Your graphics card does not support DirectX 11 features недвусмысленно говорит о том, что у вас слишком древний графический адаптер, который не поддерживает DirectX 11. И такое действительно случается. Под раздачу даже попадают видеокарты 2011 года выпуска. И неудивительно. Ведь они поддерживают только версию 10.1.
Решение проблемы простое. Нужно пойти в магазин и купить новую видеокарту. Есть еще один вариант: отказаться от идеи запуска той игры, которая выдала такую ошибку. Все равно ничего не получится до тех пор, пока вы не обновите свое оборудование. Эту ошибку исправить невозможно другими способами.
Заключение
В рамках данного материала мы поговорили о том, что делать, если вдруг возникла неустранимая ошибка DirectX. Если именно так написано в окне с ошибкой, то это еще ничего не значит. В большинстве случаев ее можно устранить. Если, конечно, она имеет программный характер, а не связана с аппаратными частями компьютера.
Для решения программных проблем существует много способов. Все они перечислены чуть выше. Некоторые из них могут показаться вам довольно сложными. Но не стоит паниковать. Нужно выполнять все в строгом соответствии с инструкцией. Только в этом случае можно надеяться, что проблема будет решена и библиотеки заработают так, как им положено. Кстати, если вы поняли, что проблема имеет аппаратный характер, то не пытайтесь ремонтировать видеокарту сами. Вы ее только убьете.
Hello. A simple question. I’m trying to create a function that creates a simple Dx11 buffer and it seems I got a lot of crashes and I dont know why. It seems that I dont know how to pass variables corectly thro a function.
original code:
struct SimpleVertex
{
FLOAT Pos[3]; // (X, Y, Z) coordinates of each vertex
float color[4];
float tex[2];
};
SimpleVertex vertices[6];
ID3D11Buffer* g_pVertexBuffer2;
// code..
//vertices are filled corectly
//code..
D3D11_BUFFER_DESC bd;
bd.Usage = D3D11_USAGE_IMMUTABLE;
bd.ByteWidth = sizeof( SimpleVertex )*6;
bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
bd.CPUAccessFlags = 0;
bd.MiscFlags = 0;
bd.StructureByteStride = 0;
D3D11_SUBRESOURCE_DATA initData;
initData.pSysMem = vertices;
hr = g_pDevice->CreateBuffer( &bd, &initData, &g_pVertexBuffer2 );
//Everything works fine
}
My atetmpt of a function
int D3Device11::CreateBuffer(ID3D11Buffer* dx11_buffer, SimpleVertex *data, int ByteWidth) {
HRESULT error;
D3D11_BUFFER_DESC bd;
bd.Usage = D3D11_USAGE_DEFAULT;
bd.ByteWidth = ByteWidth;
bd.BindFlags = D3D11_BIND_VERTEX_BUFFER;
bd.CPUAccessFlags = 0;
bd.MiscFlags = 0;
bd.StructureByteStride = 0;
D3D11_SUBRESOURCE_DATA initData;
initData.pSysMem = data;
error = g_pDevice->CreateBuffer( &bd, &initData, &dx11_buffer );
if(FAILED(error)) {
MessageBox(NULL,L"ERROR",L"error",NULL);
}
return 1;
}
CreateBuffer(g_pVertexBuffer2, vertices,sizeof(SimpleVertex)*6);
It crashes at the line where the buffer is accesed by IASetVertexBuffers
DX11error : CreateBuffer failed : E_OUTOMEMORY
DX11error : CreateBuffer failed : E_OUTOMEMORY
- Edit Task
- Edit Related Tasks…
- Mute Notifications
This error repeatedly occurs when playing in any singleplayer mission or Multiplayer server.
I have decent fps and it runs real smooth but I always get this error and can never play arma 3 for more than 5 minutes.
I have 4gs of ddr2 ram and In the Task manager it seems to be using around 3.3gs and maxing my system out.
Used -maxmem=3028 -nosplash -skipintro
launch options
Arma 3 still uses more than 3gigs of ram. {F17797}
- Legacy ID
- 681392643
- Severity
- Crash
- Resolution
- Suspended
- Reproducibility
- Always
- Category
- Game Crash
Steps To Reproduce
Press play on steam log into multiplayer browser
select multiplayer server
Load into game.
Play around anywhere from 3-5 mins and game freezes up/ crashes and I get this error.
Happened every time and makes the game unplayable.
Additional Information
Without those launch options on It makes the lobby browser slow at time and can be unresponsive even give an error when and doesn’t load up the multiplayer server.
With the -maxmem=# parameter it makes loading into multiplayer servers easier, less crashes.
I attached my dxdiag
Event Timeline
Comment Actions
DX11error : CreateBuffer failed : E_OUTOFMEMORY
is the error, I misspelled the original post.
Comment Actions
To add to this issue. I today installed 8gb of memory into my laptop to see if arma 3 would like to use more memory.
It seems as if the extra memory does nothing. Memory usage never goes above 3.5g and crashes with the same error saying out of memory even though there is still 4g+ that can be used.
Comment Actions
Demosthenes; are you sure your motherboard can support 8GB of RAM?
Comment Actions
Yes, I contacted ASUS and a technical supervisor explained to me that the motherboard ships with 4gb of memory bit and is upgrade-able to 8gb. While confirming with other ASUS customers who successfully upgraded their system.
I Tried different Dev version to no avail, the game sure does look beautiful though and runs smoother than arma 2 did on my first try at it, Will be trying different beta drivers from time to time and see if I can find a temp fix.
Fank added a comment.May 13 2014, 5:45 PM
Comment Actions
Issue closed as obsolete. If you encounter this problem again, please create another ticket. Thank you.
© Bohemia Interactive a.s. Bohemia Interactive® is a registered trademark of Bohemia Interactive a.s. All rights reserved. · Privacy Policy · Terms and Conditions
I’m trying to create a buffer in GPU memory to upload data from CPU. GPU access will be readonly. Data will be used as an input buffer for a compute shader.
CreateBuffer() fails with error 0x80070057 (E_INVALIDARG). I read the docs and read it again without discovering which argument cause the failure.
Here is an extract from my code where I marked the failure:
HRESULT hr = S_OK;
RECT rc;
GetClientRect( g_hWnd, &rc );
UINT width = rc.right - rc.left;
UINT height = rc.bottom - rc.top;
UINT createDeviceFlags = 0;
#ifdef _DEBUG
createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
#endif
D3D_DRIVER_TYPE driverTypes[] =
{
#ifdef WARP
D3D_DRIVER_TYPE_REFERENCE,
#else
D3D_DRIVER_TYPE_HARDWARE,
#endif
};
UINT numDriverTypes = sizeof( driverTypes ) / sizeof( driverTypes[0] );
DXGI_SWAP_CHAIN_DESC sd;
ZeroMemory( &sd, sizeof( sd ) );
sd.BufferCount = 1;
sd.BufferDesc.Width = width;
sd.BufferDesc.Height = height;
sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
sd.BufferDesc.RefreshRate.Numerator = 60;
sd.BufferDesc.RefreshRate.Denominator = 1;
sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_UNORDERED_ACCESS | DXGI_USAGE_SHADER_INPUT;
sd.OutputWindow = g_hWnd;
sd.SampleDesc.Count = 1;
sd.SampleDesc.Quality = 0;
sd.Windowed = TRUE;
D3D_FEATURE_LEVEL FeatureLevels = D3D_FEATURE_LEVEL_11_0;
for( UINT driverTypeIndex = 0; driverTypeIndex < numDriverTypes; driverTypeIndex++ )
{
g_driverType = driverTypes[driverTypeIndex];
hr = D3D11CreateDeviceAndSwapChain( NULL, g_driverType, NULL, createDeviceFlags, &FeatureLevels,1,
D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, NULL, &g_pImmediateContext );
if( SUCCEEDED( hr ) )
break;
}
if( FAILED( hr ) )
return hr;
// check if GPU supports doubles
D3D11_FEATURE_DATA_DOUBLES fdDoubleSupport;
g_pd3dDevice->CheckFeatureSupport( D3D11_FEATURE_DOUBLES, &fdDoubleSupport, sizeof(fdDoubleSupport) );
GPUcanDoDoubles = fdDoubleSupport.DoublePrecisionFloatShaderOps;
D3D11_BUFFER_DESC desc;
BYTE Data[200];
D3D11_SUBRESOURCE_DATA InitData;
desc.BindFlags = D3D11_BIND_UNORDERED_ACCESS | D3D11_BIND_SHADER_RESOURCE;
desc.Usage = D3D11_USAGE_DYNAMIC;
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
desc.ByteWidth = 200;
desc.MiscFlags = D3D11_RESOURCE_MISC_BUFFER_STRUCTURED;
desc.StructureByteStride = 2;
InitData.pSysMem = Data;
hr = g_pd3dDevice->CreateBuffer(&desc, &InitData, &g_pcbFractal); // <== E_INVALIARG here
// Create constant buffer
D3D11_BUFFER_DESC Desc;
Desc.Usage = D3D11_USAGE_DYNAMIC;
Desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
Desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
Desc.MiscFlags = 0;
Desc.ByteWidth = ((( (GPUcanDoDoubles) ? sizeof(MandelConstantsDoubles) : sizeof(MandelConstantsNoDoubles) ) + 15)/16)*16; // must be multiple of 16 bytes
hr = g_pd3dDevice->CreateBuffer( &Desc, NULL, &g_pcbFractal); // This one succeed
Any help appreciated.