2021-04-15 17:03:43 -07:00
|
|
|
/*
|
|
|
|
* Copyright 2002-2003 Jason Edmeades
|
|
|
|
* Copyright 2002-2003 Raphael Junqueira
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __VKD3D_D3D9TYPES_H
|
|
|
|
#define __VKD3D_D3D9TYPES_H
|
|
|
|
#ifndef _d3d9TYPES_H_
|
2021-04-15 17:03:46 -07:00
|
|
|
|
|
|
|
#ifndef MAKEFOURCC
|
|
|
|
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
|
|
|
|
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
|
|
|
|
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
|
|
|
|
#endif
|
2021-04-15 17:03:43 -07:00
|
|
|
|
|
|
|
#define D3DPS_VERSION(major, minor) (0xffff0000 | ((major) << 8) | (minor))
|
|
|
|
#define D3DVS_VERSION(major, minor) (0xfffe0000 | ((major) << 8) | (minor))
|
|
|
|
|
|
|
|
typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE
|
|
|
|
{
|
|
|
|
D3DSIO_NOP = 0x00,
|
|
|
|
D3DSIO_MOV = 0x01,
|
|
|
|
D3DSIO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