[D3DCOMPILER_43] Sync with Wine Staging 3.3. CORE-14434

This commit is contained in:
Amine Khaldi 2018-03-05 00:15:03 +01:00
parent bd5d127104
commit a8d718da39
15 changed files with 450 additions and 407 deletions

View file

@ -18,7 +18,7 @@ list(APPEND SOURCE
main.c
reflection.c
utils.c
d3dcompiler_private.h
precomp.h
${CMAKE_CURRENT_BINARY_DIR}/d3dcompiler_43_stubs.c)
add_library(d3dcompiler_43 SHARED
@ -30,5 +30,5 @@ set_module_type(d3dcompiler_43 win32dll)
target_link_libraries(d3dcompiler_43 dx10guid uuid wine wpp)
add_importlibs(d3dcompiler_43 msvcrt kernel32 ntdll)
add_dependencies(d3dcompiler_43 d3d_idl_headers)
add_pch(d3dcompiler_43 d3dcompiler_private.h SOURCE)
add_pch(d3dcompiler_43 precomp.h SOURCE)
add_cd_file(TARGET d3dcompiler_43 DESTINATION reactos/system32 FOR all)

View file

@ -20,6 +20,10 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(asmshader);

View file

@ -19,6 +19,9 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);

View file

@ -20,8 +20,12 @@
*
*/
#include "d3dcompiler_private.h"
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "d3d9types.h"
#include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(bytecodewriter);

View file

@ -17,8 +17,13 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "d3dcompiler_private.h"
#define COBJMACROS
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "d3dcompiler_private.h"
#include "wine/wpp.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);
@ -787,3 +792,11 @@ HRESULT WINAPI D3DCompileFromFile(const WCHAR *filename, const D3D_SHADER_MACRO
return E_NOTIMPL;
}
#ifndef __REACTOS__
HRESULT WINAPI D3DLoadModule(const void *data, SIZE_T size, ID3D11Module **module)
{
FIXME("data %p, size %lu, module %p stub!\n", data, size, module);
return E_NOTIMPL;
}
#endif

View file

@ -22,21 +22,18 @@
#ifndef __WINE_D3DCOMPILER_PRIVATE_H
#define __WINE_D3DCOMPILER_PRIVATE_H
#include <config.h>
#include <wine/port.h>
#include <assert.h>
#include <stdio.h>
#include "wine/debug.h"
#include "wine/list.h"
#include "wine/rbtree.h"
#define COBJMACROS
#include <windef.h>
#include <winbase.h>
#include <objbase.h>
#include <d3dcompiler.h>
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include <wine/debug.h>
#include <wine/list.h>
#include <wine/rbtree.h>
#include "d3dcompiler.h"
#include <assert.h>
/*
* This doesn't belong here, but for some functions it is possible to return that value,

File diff suppressed because it is too large Load diff

View file

@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_HLSL_E_REACTOSSYNC3_0_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_HLSL_TAB_H_INCLUDED
# define YY_HLSL_E_REACTOSSYNC3_0_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_HLSL_TAB_H_INCLUDED
#ifndef YY_HLSL_E_REACTOSSYNC_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_HLSL_TAB_H_INCLUDED
# define YY_HLSL_E_REACTOSSYNC_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_HLSL_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@ -155,7 +155,7 @@ extern int hlsl_debug;
typedef union YYSTYPE YYSTYPE;
union YYSTYPE
{
#line 906 "hlsl.y" /* yacc.c:1909 */
#line 910 "hlsl.y" /* yacc.c:1909 */
struct hlsl_type *type;
INT intval;
@ -200,4 +200,4 @@ extern YYSTYPE hlsl_lval;
extern YYLTYPE hlsl_lloc;
int hlsl_parse (void);
#endif /* !YY_HLSL_E_REACTOSSYNC3_0_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_HLSL_TAB_H_INCLUDED */
#endif /* !YY_HLSL_E_REACTOSSYNC_GCC_DLL_DIRECTX_WINE_D3DCOMPILER_43_HLSL_TAB_H_INCLUDED */

View file

@ -19,6 +19,10 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
%{
#include "config.h"
#include "wine/debug.h"
#include <stdio.h>
#include "d3dcompiler_private.h"

View file

@ -28,7 +28,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 35
#define YY_FLEX_SUBMINOR_VERSION 37
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
@ -161,15 +161,7 @@ typedef unsigned int flex_uint32_t;
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k.
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
* Ditto for the __ia64__ case accordingly.
*/
#define YY_BUF_SIZE 32768
#else
#define YY_BUF_SIZE 16384
#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
@ -181,7 +173,12 @@ typedef unsigned int flex_uint32_t;
typedef struct yy_buffer_state *YY_BUFFER_STATE;
#endif
extern int hlsl_leng;
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
extern yy_size_t hlsl_leng;
extern FILE *hlsl_in, *hlsl_out;
@ -207,11 +204,6 @@ extern FILE *hlsl_in, *hlsl_out;
#define unput(c) yyunput( c, (yytext_ptr) )
#ifndef YY_TYPEDEF_YY_SIZE_T
#define YY_TYPEDEF_YY_SIZE_T
typedef size_t yy_size_t;
#endif
#ifndef YY_STRUCT_YY_BUFFER_STATE
#define YY_STRUCT_YY_BUFFER_STATE
struct yy_buffer_state
@ -229,7 +221,7 @@ struct yy_buffer_state
/* Number of characters read into yy_ch_buf, not including EOB
* characters.
*/
int yy_n_chars;
yy_size_t yy_n_chars;
/* Whether we "own" the buffer - i.e., we know we created it,
* and can realloc() it to grow it, and should free() it to
@ -299,8 +291,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
/* yy_hold_char holds the character lost when hlsl_text is formed. */
static char yy_hold_char;
static int yy_n_chars; /* number of characters read into yy_ch_buf */
int hlsl_leng;
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
yy_size_t hlsl_leng;
/* Points to current character in buffer. */
static char *yy_c_buf_p = (char *) 0;
@ -328,7 +320,7 @@ static void hlsl__init_buffer (YY_BUFFER_STATE b,FILE *file );
YY_BUFFER_STATE hlsl__scan_buffer (char *base,yy_size_t size );
YY_BUFFER_STATE hlsl__scan_string (yyconst char *yy_str );
YY_BUFFER_STATE hlsl__scan_bytes (yyconst char *bytes,int len );
YY_BUFFER_STATE hlsl__scan_bytes (yyconst char *bytes,yy_size_t len );
void *hlsl_alloc (yy_size_t );
void *hlsl_realloc (void *,yy_size_t );
@ -360,7 +352,7 @@ void hlsl_free (void * );
/* Begin user sect3 */
#define hlsl_wrap(n) 1
#define hlsl_wrap() 1
#define YY_SKIP_YYWRAP
typedef unsigned char YY_CHAR;
@ -980,7 +972,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser);
#define YY_NO_INPUT 1
#line 984 "hlsl.yy.c"
#line 976 "hlsl.yy.c"
#define INITIAL 0
#define pp 1
@ -995,7 +987,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(hlsl_parser);
*/
#include <unistd.h>
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
#endif
@ -1023,7 +1015,7 @@ FILE *hlsl_get_out (void );
void hlsl_set_out (FILE * out_str );
int hlsl_get_leng (void );
yy_size_t hlsl_get_leng (void );
char *hlsl_get_text (void );
@ -1063,12 +1055,7 @@ static int input (void );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
#ifdef __ia64__
/* On IA-64, the buffer size is 16k, not 8k */
#define YY_READ_BUF_SIZE 16384
#else
#define YY_READ_BUF_SIZE 8192
#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
@ -1174,7 +1161,7 @@ YY_DECL
#line 60 "hlsl.l"
#line 1178 "hlsl.yy.c"
#line 1165 "hlsl.yy.c"
if ( !(yy_init) )
{
@ -1965,7 +1952,7 @@ YY_RULE_SETUP
#line 276 "hlsl.l"
ECHO;
YY_BREAK
#line 1969 "hlsl.yy.c"
#line 1956 "hlsl.yy.c"
case YY_STATE_EOF(INITIAL):
case YY_STATE_EOF(pp):
case YY_STATE_EOF(pp_line):
@ -2156,21 +2143,21 @@ static int yy_get_next_buffer (void)
else
{
int num_to_read =
yy_size_t num_to_read =
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
while ( num_to_read <= 0 )
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
if ( b->yy_is_our_buffer )
{
int new_size = b->yy_buf_size * 2;
yy_size_t new_size = b->yy_buf_size * 2;
if ( new_size <= 0 )
b->yy_buf_size += b->yy_buf_size / 8;
@ -2201,7 +2188,7 @@ static int yy_get_next_buffer (void)
/* Read in more data. */
YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
(yy_n_chars), (size_t) num_to_read );
(yy_n_chars), num_to_read );
YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars);
}
@ -2297,7 +2284,7 @@ static int yy_get_next_buffer (void)
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 716);
return yy_is_jam ? 0 : yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
}
#ifndef YY_NO_INPUT
@ -2324,7 +2311,7 @@ static int yy_get_next_buffer (void)
else
{ /* need more input */
int offset = (yy_c_buf_p) - (yytext_ptr);
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
++(yy_c_buf_p);
switch ( yy_get_next_buffer( ) )
@ -2598,7 +2585,7 @@ void hlsl_pop_buffer_state (void)
*/
static void hlsl_ensure_buffer_stack (void)
{
int num_to_alloc;
yy_size_t num_to_alloc;
if (!(yy_buffer_stack)) {
@ -2695,12 +2682,12 @@ YY_BUFFER_STATE hlsl__scan_string (yyconst char * yystr )
*
* @return the newly allocated buffer state object.
*/
YY_BUFFER_STATE hlsl__scan_bytes (yyconst char * yybytes, int _yybytes_len )
YY_BUFFER_STATE hlsl__scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len )
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
yy_size_t i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
@ -2782,7 +2769,7 @@ FILE *hlsl_get_out (void)
/** Get the length of the current token.
*
*/
int hlsl_get_leng (void)
yy_size_t hlsl_get_leng (void)
{
return hlsl_leng;
}
@ -2930,7 +2917,7 @@ void hlsl_free (void * ptr )
#define YYTABLES_NAME "yytables"
#line 276 "hlsl.l"
#line 275 "hlsl.l"

View file

@ -19,6 +19,13 @@
*
*/
#include "config.h"
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "d3dcompiler_private.h"
BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, void *reserved)

View file

@ -0,0 +1,12 @@
#ifndef __WINE_D3DCOMPILER_PRECOMP_H
#define __WINE_D3DCOMPILER_PRECOMP_H
#include <wine/config.h>
#include <wine/port.h>
#include <stdio.h>
#include "d3dcompiler_private.h"
#endif /* !__WINE_D3DCOMPILER_PRECOMP_H */

View file

@ -18,6 +18,9 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);

View file

@ -21,6 +21,11 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include <stdio.h>
#include "d3dcompiler_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3dcompiler);

View file

@ -24,7 +24,7 @@ The following libraries are shared with Wine.
reactos/dll/directx/wine/amstream # Synced to Wine-3.0
reactos/dll/directx/wine/d3d8 # Synced to Wine-3.0
reactos/dll/directx/wine/d3d9 # Synced to Wine-3.0
reactos/dll/directx/wine/d3dcompiler_43 # Synced to Wine-3.0
reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-3.3
reactos/dll/directx/wine/d3drm # Synced to WineStaging-2.16
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to Wine-3.0
reactos/dll/directx/wine/d3dxof # Synced to WineStaging-2.9