Hi,
I have been trying to implement a Yuv422 to RGB pixel shader conversion in “SDL_render_d3d.c”. I am unable to get the same format of compiled code used in this, an array “const DWORD shader_data[]” is used and this works fine but is a 420 converter, the source code and assembler are listed along with the command line needed to compile the source to assembler.
When I use fxc to compile a shader (.hlsl) i get a header file with byte code in it starting with ‘DXBC’ which as I understand it from lots of googling is the prefix for hlsl byte code. I have also tried doing a compile from file at run time which also creates a buffer containing the same.
when I try and create a PixelShader from this it fails with code 0x8876086c,
Does anyone know how to create the DWORD formatted ready to use format? this would seem to be the simplest way to move ahead
Working format
const DWORD shader_data[] = {
0xffff0200, 0x05000051, 0xa00f0000, 0xbd808081, 0xbf008081, 0xbf008081,
....... };
fxc generated format that does not work
const BYTE g_YuvToRgb[] =
{
68, 88, 66, 67, 25, 203,
28, 33, 88, 181, 245, 169,
… };