wined3d: Remove trailing spaces.
This commit is contained in:
parent
3f7cb74388
commit
560d63548d
|
@ -265,10 +265,9 @@ struct shader_arb_priv
|
|||
* ARB_[vertex/fragment]_program helper functions follow
|
||||
********************************************************/
|
||||
|
||||
/**
|
||||
* Loads floating point constants into the currently set ARB_vertex/fragment_program.
|
||||
/* Loads floating point constants into the currently set ARB_vertex/fragment_program.
|
||||
* When constant_list == NULL, it will load all the constants.
|
||||
*
|
||||
*
|
||||
* @target_type should be either GL_VERTEX_PROGRAM_ARB (for vertex shaders)
|
||||
* or GL_FRAGMENT_PROGRAM_ARB (for pixel shaders)
|
||||
*/
|
||||
|
@ -529,8 +528,8 @@ static inline void shader_arb_vs_local_constants(IWineD3DDeviceImpl* deviceImpl)
|
|||
|
||||
/**
|
||||
* Loads the app-supplied constants into the currently set ARB_[vertex/fragment]_programs.
|
||||
*
|
||||
* We only support float constants in ARB at the moment, so don't
|
||||
*
|
||||
* We only support float constants in ARB at the moment, so don't
|
||||
* worry about the Integers or Booleans
|
||||
*/
|
||||
/* GL locking is done by the caller (state handler) */
|
||||
|
|
|
@ -4178,7 +4178,7 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn
|
|||
|
||||
if( !doClip ||
|
||||
( (-rhw -eps < x) && (-rhw -eps < y) && ( -eps < z) &&
|
||||
(x <= rhw + eps) && (y <= rhw + eps ) && (z <= rhw + eps) &&
|
||||
(x <= rhw + eps) && (y <= rhw + eps ) && (z <= rhw + eps) &&
|
||||
( rhw > eps ) ) ) {
|
||||
|
||||
/* "Normal" viewport transformation (not clipped)
|
||||
|
@ -4303,7 +4303,8 @@ static HRESULT process_vertices_strided(IWineD3DDeviceImpl *This, DWORD dwDestIn
|
|||
}
|
||||
}
|
||||
|
||||
if (DestFVF & WINED3DFVF_SPECULAR) {
|
||||
if (DestFVF & WINED3DFVF_SPECULAR)
|
||||
{
|
||||
/* What's the color value in the feedback buffer? */
|
||||
const struct wined3d_stream_info_element *element = &stream_info->elements[WINED3D_FFP_SPECULAR];
|
||||
const DWORD *color_s = (const DWORD *)(element->data + i * element->stride);
|
||||
|
|
|
@ -2358,10 +2358,9 @@ static HRESULT WINAPI IWineD3DImpl_CheckDepthStencilMatch(IWineD3D *iface, UINT
|
|||
return WINED3DERR_NOTAVAILABLE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
WINED3DFORMAT SurfaceFormat,
|
||||
BOOL Windowed, WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
|
||||
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceMultiSampleType(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
WINED3DFORMAT SurfaceFormat, BOOL Windowed, WINED3DMULTISAMPLE_TYPE MultiSampleType, DWORD *pQualityLevels)
|
||||
{
|
||||
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
||||
const struct GlPixelFormatDesc *glDesc;
|
||||
const struct WineD3DAdapter *adapter;
|
||||
|
@ -3045,9 +3044,10 @@ static BOOL CheckVertexTextureCapability(struct WineD3DAdapter *adapter, const s
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
static HRESULT WINAPI IWineD3DImpl_CheckDeviceFormat(IWineD3D *iface, UINT Adapter, WINED3DDEVTYPE DeviceType,
|
||||
WINED3DFORMAT AdapterFormat, DWORD Usage, WINED3DRESOURCETYPE RType, WINED3DFORMAT CheckFormat,
|
||||
WINED3DSURFTYPE SurfaceType) {
|
||||
WINED3DSURFTYPE SurfaceType)
|
||||
{
|
||||
IWineD3DImpl *This = (IWineD3DImpl *)iface;
|
||||
struct WineD3DAdapter *adapter = &This->adapters[Adapter];
|
||||
const struct wined3d_gl_info *gl_info = &adapter->gl_info;
|
||||
|
@ -3951,14 +3951,13 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
|
|||
pCaps->MaxPointSize = GL_LIMITS(pointsize);
|
||||
|
||||
|
||||
/* FIXME: Add D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */
|
||||
pCaps->VertexProcessingCaps = WINED3DVTXPCAPS_DIRECTIONALLIGHTS |
|
||||
WINED3DVTXPCAPS_MATERIALSOURCE7 |
|
||||
WINED3DVTXPCAPS_POSITIONALLIGHTS |
|
||||
WINED3DVTXPCAPS_LOCALVIEWER |
|
||||
WINED3DVTXPCAPS_VERTEXFOG |
|
||||
WINED3DVTXPCAPS_TEXGEN;
|
||||
/* FIXME: Add
|
||||
D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */
|
||||
|
||||
pCaps->MaxPrimitiveCount = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */
|
||||
pCaps->MaxVertexIndex = 0xFFFFF;
|
||||
|
|
|
@ -699,7 +699,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT numberOfVertice
|
|||
#ifdef SHOW_FRAME_MAKEUP
|
||||
{
|
||||
static long int primCounter = 0;
|
||||
/* NOTE: set primCounter to the value reported by drawprim
|
||||
/* NOTE: set primCounter to the value reported by drawprim
|
||||
before you want to to write frame makeup to /tmp */
|
||||
if (primCounter >= 0) {
|
||||
WINED3DLOCKED_RECT r;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* GLSL pixel and vertex shader implementation
|
||||
*
|
||||
* Copyright 2006 Jason Green
|
||||
* Copyright 2006 Jason Green
|
||||
* Copyright 2006-2007 Henri Verbeet
|
||||
* Copyright 2007-2008 Stefan Dösinger for CodeWeavers
|
||||
* Copyright 2009 Henri Verbeet for CodeWeavers
|
||||
|
@ -940,7 +940,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont
|
|||
}
|
||||
}
|
||||
|
||||
/* Declare texture samplers */
|
||||
/* Declare texture samplers */
|
||||
for (i = 0; i < This->baseShader.limits.sampler; i++) {
|
||||
if (reg_maps->sampler_type[i])
|
||||
{
|
||||
|
@ -1104,22 +1104,22 @@ static void shader_glsl_add_src_param(const struct wined3d_shader_instruction *i
|
|||
|
||||
/** Used for opcode modifiers - They multiply the result by the specified amount */
|
||||
static const char * const shift_glsl_tab[] = {
|
||||
"", /* 0 (none) */
|
||||
"2.0 * ", /* 1 (x2) */
|
||||
"4.0 * ", /* 2 (x4) */
|
||||
"8.0 * ", /* 3 (x8) */
|
||||
"16.0 * ", /* 4 (x16) */
|
||||
"32.0 * ", /* 5 (x32) */
|
||||
"", /* 6 (x64) */
|
||||
"", /* 7 (x128) */
|
||||
"", /* 8 (d256) */
|
||||
"", /* 9 (d128) */
|
||||
"", /* 10 (d64) */
|
||||
"", /* 11 (d32) */
|
||||
"0.0625 * ", /* 12 (d16) */
|
||||
"0.125 * ", /* 13 (d8) */
|
||||
"0.25 * ", /* 14 (d4) */
|
||||
"0.5 * " /* 15 (d2) */
|
||||
"", /* 0 (none) */
|
||||
"2.0 * ", /* 1 (x2) */
|
||||
"4.0 * ", /* 2 (x4) */
|
||||
"8.0 * ", /* 3 (x8) */
|
||||
"16.0 * ", /* 4 (x16) */
|
||||
"32.0 * ", /* 5 (x32) */
|
||||
"", /* 6 (x64) */
|
||||
"", /* 7 (x128) */
|
||||
"", /* 8 (d256) */
|
||||
"", /* 9 (d128) */
|
||||
"", /* 10 (d64) */
|
||||
"", /* 11 (d32) */
|
||||
"0.0625 * ", /* 12 (d16) */
|
||||
"0.125 * ", /* 13 (d8) */
|
||||
"0.25 * ", /* 14 (d4) */
|
||||
"0.5 * " /* 15 (d2) */
|
||||
};
|
||||
|
||||
/* Generate a GLSL parameter that does the input modifier computation and return the input register/mask to use */
|
||||
|
@ -1777,9 +1777,7 @@ static void PRINTF_ATTR(8, 9) shader_glsl_gen_sample_code(const struct wined3d_s
|
|||
}
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* Begin processing individual instruction opcodes
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Generate GLSL arithmetic functions (dst = src1 + src2) */
|
||||
|
@ -2264,8 +2262,8 @@ static void shader_glsl_mad(const struct wined3d_shader_instruction *ins)
|
|||
src0_param.param_str, src1_param.param_str, src2_param.param_str);
|
||||
}
|
||||
|
||||
/** Handles transforming all WINED3DSIO_M?x? opcodes for
|
||||
Vertex shaders to GLSL codes */
|
||||
/* Handles transforming all WINED3DSIO_M?x? opcodes for
|
||||
Vertex shaders to GLSL codes */
|
||||
static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
|
||||
{
|
||||
int i;
|
||||
|
@ -2321,7 +2319,7 @@ static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
|
|||
}
|
||||
|
||||
/**
|
||||
The LRP instruction performs a component-wise linear interpolation
|
||||
The LRP instruction performs a component-wise linear interpolation
|
||||
between the second and third operands using the first operand as the
|
||||
blend factor. Equation: (dst = src2 + src0 * (src1 - src2))
|
||||
This is equivalent to mix(src2, src1, src0);
|
||||
|
@ -2418,7 +2416,7 @@ static void shader_glsl_dst(const struct wined3d_shader_instruction *ins)
|
|||
/** Process the WINED3DSIO_SINCOS instruction in GLSL:
|
||||
* VS 2.0 requires that specific cosine and sine constants be passed to this instruction so the hardware
|
||||
* can handle it. But, these functions are built-in for GLSL, so we can just ignore the last 2 params.
|
||||
*
|
||||
*
|
||||
* dst.x = cos(src0.?)
|
||||
* dst.y = sin(src0.?)
|
||||
* dst.z = dst.z
|
||||
|
@ -3037,7 +3035,7 @@ static void shader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
|
|||
current_state->current_row = 0;
|
||||
}
|
||||
|
||||
/** Process the WINED3DSIO_TEXM3X3SPEC instruction in GLSL
|
||||
/* Process the WINED3DSIO_TEXM3X3SPEC instruction in GLSL
|
||||
* Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */
|
||||
static void shader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins)
|
||||
{
|
||||
|
@ -3068,7 +3066,7 @@ static void shader_glsl_texm3x3spec(const struct wined3d_shader_instruction *ins
|
|||
current_state->current_row = 0;
|
||||
}
|
||||
|
||||
/** Process the WINED3DSIO_TEXM3X3VSPEC instruction in GLSL
|
||||
/* Process the WINED3DSIO_TEXM3X3VSPEC instruction in GLSL
|
||||
* Perform the final texture lookup based on the previous 2 3x3 matrix multiplies */
|
||||
static void shader_glsl_texm3x3vspec(const struct wined3d_shader_instruction *ins)
|
||||
{
|
||||
|
|
|
@ -31,11 +31,11 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
|||
* Stateblock helper functions follow
|
||||
**************************************/
|
||||
|
||||
/** Allocates the correct amount of space for pixel and vertex shader constants,
|
||||
/* Allocates the correct amount of space for pixel and vertex shader constants,
|
||||
* along with their set/changed flags on the given stateblock object
|
||||
*/
|
||||
HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object) {
|
||||
|
||||
HRESULT allocate_shader_constants(IWineD3DStateBlockImpl* object)
|
||||
{
|
||||
IWineD3DStateBlockImpl *This = object;
|
||||
|
||||
/* Allocate space for floating point constants */
|
||||
|
@ -113,11 +113,8 @@ static inline void stateblock_set_bits(DWORD *map, UINT map_size)
|
|||
}
|
||||
|
||||
/** Set all members of a stateblock savedstate to the given value */
|
||||
void stateblock_savedstates_set(
|
||||
IWineD3DStateBlock* iface,
|
||||
SAVEDSTATES* states,
|
||||
BOOL value) {
|
||||
|
||||
void stateblock_savedstates_set(IWineD3DStateBlock *iface, SAVEDSTATES *states, BOOL value)
|
||||
{
|
||||
IWineD3DStateBlockImpl *This = (IWineD3DStateBlockImpl *)iface;
|
||||
unsigned bsize = sizeof(BOOL);
|
||||
|
||||
|
@ -228,7 +225,7 @@ void stateblock_copy(
|
|||
memcpy(Dest->vertexShaderConstantI, This->vertexShaderConstantI, sizeof(INT) * MAX_CONST_I * 4);
|
||||
memcpy(Dest->pixelShaderConstantB, This->pixelShaderConstantB, sizeof(BOOL) * MAX_CONST_B);
|
||||
memcpy(Dest->pixelShaderConstantI, This->pixelShaderConstantI, sizeof(INT) * MAX_CONST_I * 4);
|
||||
|
||||
|
||||
memcpy(Dest->streamStride, This->streamStride, sizeof(UINT) * MAX_STREAMS);
|
||||
memcpy(Dest->streamOffset, This->streamOffset, sizeof(UINT) * MAX_STREAMS);
|
||||
memcpy(Dest->streamSource, This->streamSource, sizeof(IWineD3DBuffer *) * MAX_STREAMS);
|
||||
|
|
|
@ -2973,7 +2973,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_Flip(IWineD3DSurface *iface, IWineD3DS
|
|||
}
|
||||
|
||||
if(override) {
|
||||
/* DDraw sets this for the X11 surfaces, so don't confuse the user
|
||||
/* DDraw sets this for the X11 surfaces, so don't confuse the user
|
||||
* FIXME("(%p) Target override is not supported by now\n", This);
|
||||
* Additionally, it isn't really possible to support triple-buffering
|
||||
* properly on opengl at all
|
||||
|
|
|
@ -186,7 +186,7 @@ static ULONG WINAPI IWineD3DVertexShaderImpl_Release(IWineD3DVertexShader *iface
|
|||
|
||||
static HRESULT WINAPI IWineD3DVertexShaderImpl_GetParent(IWineD3DVertexShader *iface, IUnknown** parent){
|
||||
IWineD3DVertexShaderImpl *This = (IWineD3DVertexShaderImpl *)iface;
|
||||
|
||||
|
||||
*parent = This->parent;
|
||||
IUnknown_AddRef(*parent);
|
||||
TRACE("(%p) : returning %p\n", This, *parent);
|
||||
|
|
|
@ -44,7 +44,7 @@ CRITICAL_SECTION wined3d_cs = {&wined3d_cs_debug, -1, 0, 0, 0, 0};
|
|||
|
||||
/* When updating default value here, make sure to update winecfg as well,
|
||||
* where appropriate. */
|
||||
wined3d_settings_t wined3d_settings =
|
||||
wined3d_settings_t wined3d_settings =
|
||||
{
|
||||
VS_HW, /* Hardware by default */
|
||||
PS_HW, /* Hardware by default */
|
||||
|
|
|
@ -242,7 +242,7 @@ static inline float float_24_to_32(DWORD in)
|
|||
}
|
||||
|
||||
/**
|
||||
* Settings
|
||||
* Settings
|
||||
*/
|
||||
#define VS_NONE 0
|
||||
#define VS_HW 1
|
||||
|
@ -969,8 +969,8 @@ extern const float identity[16];
|
|||
/* Trace information per-vertex: (extremely high amount of trace) */
|
||||
#if 0 /* NOTE: Must be 0 in cvs */
|
||||
# define VTRACE(A) TRACE A
|
||||
#else
|
||||
# define VTRACE(A)
|
||||
#else
|
||||
# define VTRACE(A)
|
||||
#endif
|
||||
|
||||
/* TODO: Confirm each of these works when wined3d move completed */
|
||||
|
@ -983,21 +983,21 @@ extern const float identity[16];
|
|||
the file is deleted */
|
||||
# if 1 /* NOTE: Must be 1 in cvs, as this is mostly more useful than a trace from program start */
|
||||
# define SINGLE_FRAME_DEBUGGING
|
||||
# endif
|
||||
# endif
|
||||
/* The following, when enabled, lets you see the makeup of the frame, by drawprimitive calls.
|
||||
It can only be enabled when FRAME_DEBUGGING is also enabled
|
||||
The contents of the back buffer are written into /tmp/backbuffer_* after each primitive
|
||||
It can only be enabled when FRAME_DEBUGGING is also enabled
|
||||
The contents of the back buffer are written into /tmp/backbuffer_* after each primitive
|
||||
array is drawn. */
|
||||
# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
|
||||
# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
|
||||
# define SHOW_FRAME_MAKEUP 1
|
||||
# endif
|
||||
# endif
|
||||
/* The following, when enabled, lets you see the makeup of the all the textures used during each
|
||||
of the drawprimitive calls. It can only be enabled when SHOW_FRAME_MAKEUP is also enabled.
|
||||
The contents of the textures assigned to each stage are written into
|
||||
The contents of the textures assigned to each stage are written into
|
||||
/tmp/texture_*_<Stage>.ppm after each primitive array is drawn. */
|
||||
# if 0 /* NOTE: Must be 0 in cvs, as this give a lot of ppm files when compiled in */
|
||||
# define SHOW_TEXTURE_MAKEUP 0
|
||||
# endif
|
||||
# endif
|
||||
extern BOOL isOn;
|
||||
extern BOOL isDumpingFrames;
|
||||
extern LONG primCounter;
|
||||
|
@ -2362,7 +2362,7 @@ typedef struct IWineD3DQueryImpl
|
|||
{
|
||||
const IWineD3DQueryVtbl *lpVtbl;
|
||||
LONG ref; /* Note: Ref counting not required */
|
||||
|
||||
|
||||
IUnknown *parent;
|
||||
/*TODO: replace with iface usage */
|
||||
#if 0
|
||||
|
@ -2376,8 +2376,6 @@ typedef struct IWineD3DQueryImpl
|
|||
WINED3DQUERYTYPE type;
|
||||
/* TODO: Think about using a IUnknown instead of a void* */
|
||||
void *extendedData;
|
||||
|
||||
|
||||
} IWineD3DQueryImpl;
|
||||
|
||||
extern const IWineD3DQueryVtbl IWineD3DQuery_Vtbl;
|
||||
|
@ -2498,7 +2496,7 @@ struct wined3d_context *IWineD3DSwapChainImpl_CreateContextForThread(IWineD3DSwa
|
|||
#define DEFAULT_REFRESH_RATE 0
|
||||
|
||||
/*****************************************************************************
|
||||
* Utility function prototypes
|
||||
* Utility function prototypes
|
||||
*/
|
||||
|
||||
/* Trace routines */
|
||||
|
@ -2576,8 +2574,8 @@ typedef struct SHADER_LIMITS {
|
|||
unsigned int label;
|
||||
} SHADER_LIMITS;
|
||||
|
||||
/** Keeps track of details for TEX_M#x# shader opcodes which need to
|
||||
maintain state information between multiple codes */
|
||||
/* Keeps track of details for TEX_M#x# shader opcodes which need to
|
||||
* maintain state information between multiple codes */
|
||||
typedef struct SHADER_PARSE_STATE {
|
||||
unsigned int current_row;
|
||||
DWORD texcoord_w[2];
|
||||
|
@ -2725,7 +2723,7 @@ static inline BOOL shader_constant_is_local(IWineD3DBaseShaderImpl* This, DWORD
|
|||
* IDirect3DVertexShader implementation structures
|
||||
*/
|
||||
typedef struct IWineD3DVertexShaderImpl {
|
||||
/* IUnknown parts*/
|
||||
/* IUnknown parts */
|
||||
const IWineD3DVertexShaderVtbl *lpVtbl;
|
||||
|
||||
/* IWineD3DBaseShader */
|
||||
|
|
Loading…
Reference in New Issue