blob.c
bytecodewriter.c
compiler.c
- d3dcompiler_43_main.c
hlsl.tab.c
hlsl.yy.c
+ main.c
reflection.c
utils.c
d3dcompiler_private.h
return d3dcompiler_strip_shader(data, data_size, flags, blob);
}
+
+HRESULT WINAPI D3DReadFileToBlob(const WCHAR *filename, ID3DBlob **contents)
+{
+ FIXME("filename %s, contents %p\n", debugstr_w(filename), contents);
+
+ return E_NOTIMPL;
+}
+
+HRESULT WINAPI D3DWriteBlobToFile(ID3DBlob* blob, const WCHAR *filename, BOOL overwrite)
+{
+ FIXME("blob %p, filename %s, overwrite %d\n", blob, debugstr_w(filename), overwrite);
+
+ return E_NOTIMPL;
+}
put_dword(buffer, instr_dcl);
/* Write the usage and index */
- token = (1 << 31); /* Bit 31 of non-instruction opcodes is 1 */
+ token = (1u << 31); /* Bit 31 of non-instruction opcodes is 1 */
token |= (decls[i].usage << D3DSP_DCL_USAGE_SHIFT) & D3DSP_DCL_USAGE_MASK;
token |= (decls[i].usage_idx << D3DSP_DCL_USAGEINDEX_SHIFT) & D3DSP_DCL_USAGEINDEX_MASK;
put_dword(buffer, token);
static void write_const(struct constant **consts, int num, DWORD opcode, DWORD reg_type, struct bytecode_buffer *buffer, BOOL len) {
int i;
DWORD instr_def = opcode;
- const DWORD reg = (1<<31) | d3dsp_register( reg_type, 0 ) | D3DSP_WRITEMASK_ALL;
+ const DWORD reg = (1u << 31) | d3dsp_register( reg_type, 0 ) | D3DSP_WRITEMASK_ALL;
if(len) {
if(opcode == D3DSIO_DEFB)
static void vs_12_dstreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD has_wmask;
if(reg->rel_reg) {
static void vs_1_x_srcreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD has_swizzle;
DWORD component;
static void ps_1_0123_srcreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported in <= ps_3_0\n");
This->state = E_INVALIDARG;
static void ps_1_0123_dstreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported for destination registers\n");
static void ps_1_4_srcreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported in <= ps_3_0\n");
This->state = E_INVALIDARG;
static void ps_1_4_dstreg(struct bc_writer *This, const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
if(reg->rel_reg) {
WARN("Relative addressing not supported for destination registers\n");
static void vs_2_srcreg(struct bc_writer *This,
const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD has_swizzle;
DWORD component;
DWORD d3d9reg;
DWORD i;
DWORD instr_dcl = D3DSIO_DCL | (2 << D3DSI_INSTLENGTH_SHIFT);
DWORD token;
- const DWORD reg = (1<<31) | d3dsp_register( D3DSPR_SAMPLER, 0 ) | D3DSP_WRITEMASK_ALL;
+ const DWORD reg = (1u << 31) | d3dsp_register( D3DSPR_SAMPLER, 0 ) | D3DSP_WRITEMASK_ALL;
for(i = 0; i < shader->num_samplers; i++) {
/* Write the DCL instruction */
put_dword(buffer, instr_dcl);
- token = (1<<31);
+ token = (1u << 31);
/* Already shifted */
token |= (d3d9_sampler(shader->samplers[i].type)) & D3DSP_TEXTURETYPE_MASK;
put_dword(buffer, token);
static void ps_2_srcreg(struct bc_writer *This,
const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
if(reg->rel_reg) {
WARN("Relative addressing not supported in <= ps_3_0\n");
const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
if(reg->rel_reg) {
static void sm_3_srcreg(struct bc_writer *This,
const struct shader_reg *reg,
struct bytecode_buffer *buffer) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
d3d9reg = d3d9_register(reg->type);
const struct shader_reg *reg,
struct bytecode_buffer *buffer,
DWORD shift, DWORD mod) {
- DWORD token = (1 << 31); /* Bit 31 of registers is 1 */
+ DWORD token = (1u << 31); /* Bit 31 of registers is 1 */
DWORD d3d9reg;
if(reg->rel_reg) {
return S_OK;
}
-HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
+HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
- const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages)
+ const char *target, UINT sflags, UINT eflags, UINT secondary_flags,
+ const void *secondary_data, SIZE_T secondary_data_size, ID3DBlob **shader,
+ ID3DBlob **error_messages)
{
HRESULT hr;
TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint %s,\n"
- "target %s, sflags %#x, eflags %#x, shader %p, error_messages %p\n",
+ "target %s, sflags %#x, eflags %#x, secondary_flags %#x, secondary_data %p,\n"
+ "secondary_data_size %lu, shader %p, error_messages %p\n",
data, data_size, debugstr_a(filename), defines, include, debugstr_a(entrypoint),
- debugstr_a(target), sflags, eflags, shader, error_messages);
+ debugstr_a(target), sflags, eflags, secondary_flags, secondary_data,
+ secondary_data_size, shader, error_messages);
+
+ if (secondary_data)
+ FIXME("secondary data not implemented yet\n");
if (shader) *shader = NULL;
if (error_messages) *error_messages = NULL;
return hr;
}
+HRESULT WINAPI D3DCompile(const void *data, SIZE_T data_size, const char *filename,
+ const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
+ const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages)
+{
+ TRACE("data %p, data_size %lu, filename %s, defines %p, include %p, entrypoint %s,\n"
+ "target %s, sflags %#x, eflags %#x, shader %p, error_messages %p\n",
+ data, data_size, debugstr_a(filename), defines, include, debugstr_a(entrypoint),
+ debugstr_a(target), sflags, eflags, shader, error_messages);
+
+ return D3DCompile2(data, data_size, filename, defines, include, entrypoint, target, sflags,
+ eflags, 0, NULL, 0, shader, error_messages);
+}
+
HRESULT WINAPI D3DPreprocess(const void *data, SIZE_T size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include,
ID3DBlob **shader, ID3DBlob **error_messages)
data, size, flags, comments, disassembly);
return E_NOTIMPL;
}
+
+HRESULT WINAPI D3DCompileFromFile(const WCHAR *filename, const D3D_SHADER_MACRO *defines, ID3DInclude *includes,
+ const char *entrypoint, const char *target, UINT flags1, UINT flags2, ID3DBlob **code, ID3DBlob **errors)
+{
+ FIXME("filename %s, defines %p, includes %p, entrypoint %s, target %s, flags1 %x, flags2 %x, code %p, errors %p\n",
+ debugstr_w(filename), defines, includes, debugstr_a(entrypoint), debugstr_a(target), flags1, flags2, code, errors);
+
+ return E_NOTIMPL;
+}
BWRITERSPSM_NOT,
};
-#define BWRITER_SM1_VS 0xfffe
-#define BWRITER_SM1_PS 0xffff
+#define BWRITER_SM1_VS 0xfffeu
+#define BWRITER_SM1_PS 0xffffu
#define BWRITERPS_VERSION(major, minor) ((BWRITER_SM1_PS << 16) | ((major) << 8) | (minor))
#define BWRITERVS_VERSION(major, minor) ((BWRITER_SM1_VS << 16) | ((major) << 8) | (minor))
reactos/dll/directx/wine/amstream # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3d8 # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3d9 # Synced to WineStaging-1.7.55
-reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.47
+reactos/dll/directx/wine/d3dcompiler_43 # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3drm # Synced to WineStaging-1.7.47
reactos/dll/directx/wine/d3dx9_24 => 43 # Synced to WineStaging-1.7.55
reactos/dll/directx/wine/d3dxof # Synced to WineStaging-1.7.47