x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Access GPU resource

I'm currently searching inside the engine code to find how to get access to the GPU resources. I need access to the DirectX device (DX11 only) to create a shared texture with another process of my own.

I know that once I will get access to the device, the rest will work. But I don't find how/where to do that.

I already found that in MediaCapture (inside the runtime/MediaIOCore module) are two lines that are good candidate as entry point.

 // Asynchronously copy target from GPU to GPU
 RHICmdList.CopyToResolveTarget(SourceTexture, DestRenderTarget.TargetableTexture, FResolveParams());
     
 // Asynchronously copy duplicate target from GPU to System 
 MemoryRHICmdList.CopyToResolveTarget(DestRenderTarget.TargetableTexture, InCapturingFrame->ReadbackTexture, FResolveParams());

I suspect that if I can get some of my code near that, I can gain the access to what I want.

If anyone has pointers, you're welcome.

Product Version: UE 4.20
Tags:
more ▼

asked Feb 07 '19 at 03:35 PM in Rendering

avatar image

AfroDiscoKappa
25 3 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I found the answer by myself.

For those wandering how to do, you must use ENQUEUE_UNIQUE_RENDER_COMMAND_XXXPARAMETER() with XX beeing 1->6 in full letter.

This will allow your code to run on the rendering thread. Based on the rendering thread and the code found above the one mentioned in the question, it is quiet easy to get access to the texture which is currently the latest rendered.

more ▼

answered Feb 21 '19 at 12:30 PM

avatar image

AfroDiscoKappa
25 3 3 5

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question