Which format to use for a shader resource view into depth-stencil buffer resource? - dxgi

The depth-stencil buffer resource is defined as DXGI_FORMAT_D24_UNORM_S8_UINT format.
I would have assumed that to create a shader resource view (SRV) into that resource would require the view format to be described either as:
DXGI_FORMAT_R24_UNORM_X8_TYPELESS where red channel accesses depth value
DXGI_FORMAT_R24G8_TYPELESS where red channel accesses depth and green channel stencil value
However, creating such SRV fails with the following error:
D3D12 ERROR: ID3D12Device::CreateShaderResourceView: For the resource format D24_UNORM_S8_UINT, when making a D3D view, the format name for the view can't be R24_UNORM_X8_TYPELESS. See documentation for the set of valid view format names for this resource format, determining which how the resource (or part of it) will appear to shader. [ STATE_CREATION ERROR #28: CREATESHADERRESOURCEVIEW_INVALIDFORMAT]
Looking into API doc yielded me with the following piece of information:
When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you can't create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view.
I don't really understand why a typeless format is not allowed and which format should I use instead?

It is the opposite, you create the resource with typeless components and you specialize the resource in a view with the final representation you need. Since you gave the resource stencil a uint representation already, you are stuck with it.

Related

How do I convert a winrt::Microsoft::AI::MachineLearning::TensorFloat type back to ID3D12Resource

I am loading an image to the GPU by leveraging ID3D12Resource type. And I found some documentation on how to convert the ID3D12Resource to a Microsoft::AI::MachineLearning::TensorFloat in the Microsoft documentation, but I can't seem to find how to revert it back to ID3D12Resource.
I am following the Machine Learning samples from Microsoft documentation, and the output from the model evaluation is a Microsoft::AI::MachineLearning::TensorFloat type:
https://github.com/microsoft/Windows-Machine-Learning/blob/e901cc2791f4f3d22e2382e779996bad49173718/Samples/AdapterSelection/AdapterSelection/cpp/main.cpp#L110
How do I take the model output that is a TensorFloat type and convert it back to ID3D12Resource. Ideally, I would like to override the content from the original ID3D12Resource input with the return of the model.
Thank you for your help :)

Adding reference to external PDF on FHIR resource

I am wanting to add a reference to an external/3rd party PDF datasheet with more information on a Medication resource, am I best to add this as an extension with the Url of the extension pointing to the "home page" for the datasheets, and a valueString of the URL of the PDF (the PDFs are not currently available via an API).
For example, if I wanted to reference the PDF available at the following: https://www.medicines.org.uk/emc/files/pil.9845.pdf
I'd set the Url = https://www.medicines.org.uk/emc/ and the valueString = https://www.medicines.org.uk/emc/files/pil.9845.pdf
It would be better to use valueUri rather than valueString given that it's supposed to be a reference. Your alternative would be have the extension be valueReference that points to a DocumentReference which could then give some metadata about the PDF, but if you don't have that, a simple valueUri is fine. You might also look at the MedicationKnowledge resource, as the focus there is conveying more "drug masterfile" type information. Medication is more the resource sent with the prescription or dispense to describe exactly what was prescribed/dispensed, not to convey knowledge about it.

Does ImageProcessor ImageFactory Load System.Drawing.Image modify by reference argument

ImageProcessor ImageFactory supports Load method with argument System.Drawing.Image. But Save method does not support similar argument. Is there a way with ImageProcessor ImageFactory to Load a System.Drawing.Image, manipulate the image, e.g., Brightness, then Save the modified image to System.Drawing.Image?
You can't use a reference to the original image since that is tightly bound to the input stream.
You can either.
1. Save to the output stream and use Image.FromStream to create a new image.
2. Use a binary formatter to perform a deep clone of the ImageFactory.Image property https://stackoverflow.com/a/43042865/427899

How to link Dynpro screen elements to program variables?

I am trying to use the elements I made in Screen Painter in my source code but I am not quite sure how to link them. Can you provide steps how I can link my elements in Screen Painter with ABAP variables?
The connection is established via the name.
If you declare a variable in your report like this:
DATA foo TYPE c.
Then you can view it on your screen by adding a field called foo.
A useful feature of the screen painter is choosing dictionary/program fields. You can access it by pressing F6.
The reference is made by the name of global variables.
You may - as already mentioned - use a DATA matnr TYPE MATNR. to create a global variable matnr.
If you use DDIC-structures or tables you may also define them as
TABLES: MARA.
In screen painter you can reference the fields of the table/structure MARA.
(You can replace MARA with any table/structure).
Depending on the complexity of your program you may define your own structure, just as a interface between the report code and the screen-painter.
The variables used in screen painter should be declared in a TOP in order to be accessed from the includes in the program.
For example, in my screen I request for a Business Partner name and map it to GT_NAME. GT_NAME should be declared in the TOP with something like the code below:
DATA: GT_NAME type bu_first.
That automatically creates the link between the global variables and the input parameters in the screen.

CoreAudio: What is "AudioBox" as contrasted to "AudioDevice"

The header file CoreAudio/AudioHardware.h refers to a class "AudioBox" and indicates that it is distinct from but related to the class "AudioDevice". Searching developer.apple.com yields no hits for AudioBox. There is, unfortunately, a commercial product called AudioBox™, which makes googling for the term painfully low-yield.
Here are the comments containing the references:
kAudioHardwarePropertyBoxList
An array of AudioObjectIDs that represent all the AudioBox
objects currently provided by the system.
kAudioHardwarePropertyTranslateUIDToBox
This property fetches the AudioObjectID that corresponds to the
AudioBox that has the given UID. The UID is passed in via the qualifier as a CFString while the AudioObjectID for the AudioBox is
returned to the caller as the property's data. Note that an error
is not returned if the UID doesn't refer to any AudioBoxes.
Rather, this property will return kAudioObjectUnknown as the value of the property.
The header file: AudioHardwareBase.h contains numerous references to AudioBox, but does not define or explain it, although it associates it with AudioDevice.
Searching the docs via XCode just takes me back to AudioHardwareBase.h.
I can infer that perhaps an "AudioBox" is an audio device that is accessed via a plugin. But this does not appear to be stated anywhere.
So What Is An AudioBox?
An AudioBox is a container of (usually) AudioDevices

Resources