Jump to content

  • Log In with Google      Sign In   
  • Create Account

BornToCode

Member Since 17 Apr 2004
Offline Last Active Apr 22 2016 08:43 PM

Topics I've Started

Working for a startup.

10 January 2016 - 02:24 PM

I am kind of in a dilemma right now. I have been working in the graphics industry ranging from games to projectors for the past 10 years. I recently received a job offer for a Senior graphics role in a start up company, at the same time i also received another job offer working in the medical field on a 3d cad like software. The medical one uses Javascript and WebGL. The other one as we all know is C++/DirectX11. I also have two kids, so stability/work life balance is very important, but at the same time i know i would enjoy the graphics role more. But in the back of my mind i know that the graphics role which is for the game company probably not gonna last a long time.So what would you guys recommend in that case.


DirectX12 Minumum Allocation size.

13 September 2015 - 09:22 AM

It looks like even for a buffer with a width 1 ID3D12Device::GetResourseAllocationInfo always returns the size/aligment as 64K. That is not a problem. The issue i am having is that any resource created on that heap needs to respect the aligment. So if put a resource at Offset 0 and try to put another resource at 32k for example. The resource at 0 will work but when i try to put something at 32k, it generates an error that say all resource needs to respect the boundary. So if i have two distinct buffers of let's say 32k each, there is no way i can create two distinct resources with the exact amout of memory i want to use because of that issue. One buffer would need to be at HeapOffset 0 and the other at HeapOffset 64k. Also now i would need to create a Heap with a size of 64k*2 in order to put two 32k buffers in there. Now i just waste 32k on each side. I know i can overcome this by creating one Huge buffer and and just point to the buffer location that i want to draw. But i kind of find it very annoying that the API does not let you insert the data into any location in a Heap.

 

All in all i know you can write a system that managed the heaps similar to how you would do it in the CPU side if you were to write your own memory management system. That

way that limitation does not seem like it exist.


DX12 Some structure have Int type which uses a specific enum.

12 September 2015 - 01:08 PM

I do not know why microsoft would do this. I think it would have make things easier to know which parameter they took, especially when you have a enum define for something. Then in the structure instead of defining one of the attribute with that enum they pass an Int instead. A good example of that is

enum D3D12_COMMAND_QUEUE_PRIORITY
    {
        D3D12_COMMAND_QUEUE_PRIORITY_NORMAL    = 0,
        D3D12_COMMAND_QUEUE_PRIORITY_HIGH    = 100
    }     D3D12_COMMAND_QUEUE_PRIORITY;

typedef struct D3D12_COMMAND_QUEUE_DESC
    {
    D3D12_COMMAND_LIST_TYPE Type;
    INT Priority;
    D3D12_COMMAND_QUEUE_FLAGS Flags;
    UINT NodeMask;
    }   

 

The Priority flag is a D3D12_COMMAND_QUEUE_PRIOORITY why the heck would they pass an Int. I know at the end of the day an enum is just an Int, but it would have been more friendly and i would not need to look at the documentation to make sure that the correct Int values that can be passed are D3D12_COMMAND_QUEUE_PRIORITY. I am pretty  sure they have similar issues throughout the API.


D3D12 Evict and MakeResident.

30 August 2015 - 12:24 PM

The question i have is do i need to have a fence whenever i call Evict and MakeResident. Or these will happen immediately. Or do you only need to worry about fence only and only if you are messing with the commandlist.


DirectX12 Question that is bothering me.

08 August 2015 - 12:37 AM

Imagine you have n command list that are running and each one of those list is drawing an object with a specific set of textures. Now all of the sudden i decided that i want to map an resource which is been currently used in one of the command list, how can i tell whether the gpu is currently using that resource so i can properly synchronize. Since the only way to synchronize is through the CommandQueue by using a fence does that means in that case whenever i call map would i need to submit all pending command list and wait until the fence is return before mapping. Or i guess another option would be to keep track of which command list the resource belongs too and only flush those commandList. I would like to see what others think.

 

Thanks,

Jerome.


PARTNERS