mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
comment fixes
This commit is contained in:
parent
aaaa5af0b2
commit
f628695d31
@ -464,9 +464,9 @@ void ProgramShaderCache::CreateHeader ( void )
|
||||
"#define frac fract\n"
|
||||
"#define lerp mix\n"
|
||||
|
||||
// Terrible hack, look at DriverDetails.h
|
||||
"%s\n"
|
||||
"%s\n"
|
||||
// Terrible hacks, look at DriverDetails.h
|
||||
"%s\n" // replace textureSize as constant
|
||||
"%s\n" // wipe out all centroid usages
|
||||
|
||||
, v==GLSLES3 ? "#version 300 es" : v==GLSL_130 ? "#version 130" : v==GLSL_140 ? "#version 140" : "#version 150"
|
||||
, v<GLSL_140 ? "#extension GL_ARB_uniform_buffer_object : enable" : ""
|
||||
|
@ -95,7 +95,7 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
WRITE(p, " int x_block_position = (x_virtual_position >> %d) & %d;\n", Log2(blkH), ~(blkW - 1));
|
||||
if (samples == 1)
|
||||
{
|
||||
// 32 bit textures (RGBA8 and Z24) are store in 2 cache line increments
|
||||
// 32 bit textures (RGBA8 and Z24) are stored in 2 cache line increments
|
||||
WRITE(p, " bool first = 0 == (x_virtual_position & %d);\n", 8 * samples); // first cache line, used in the encoders
|
||||
WRITE(p, " x_virtual_position = x_virtual_position << 1;\n");
|
||||
}
|
||||
@ -107,10 +107,13 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
|
||||
|
||||
WRITE(p, " float2 uv0 = float2(sampleUv);\n"); // sampleUv is the sample position in (int)gx_coords
|
||||
WRITE(p, " uv0 += float2(0.5, 0.5);\n"); // move to center of pixel
|
||||
WRITE(p, " uv0 *= float(position.w);\n"); // scale by two if needed (this will move to pixels border to filter linear)
|
||||
WRITE(p, " uv0 += float2(position.xy);\n"); // move to copyed rect
|
||||
WRITE(p, " uv0 /= float2(%d, %d);\n", EFB_WIDTH, EFB_HEIGHT); // normlize to [0:1]
|
||||
WRITE(p, " uv0.y = 1.0-uv0.y;\n"); // ogl foo (disable this line for d3d)
|
||||
WRITE(p, " uv0 *= float(position.w);\n"); // scale by two if needed (also move to pixel borders so that linear filtering will average adjacent pixel)
|
||||
WRITE(p, " uv0 += float2(position.xy);\n"); // move to copied rect
|
||||
WRITE(p, " uv0 /= float2(%d, %d);\n", EFB_WIDTH, EFB_HEIGHT); // normalize to [0:1]
|
||||
if (ApiType == API_OPENGL) // ogl has to flip up and down
|
||||
{
|
||||
WRITE(p, " uv0.y = 1.0-uv0.y;\n");
|
||||
}
|
||||
|
||||
WRITE(p, " float sample_offset = position.w / float(%d);\n", EFB_WIDTH);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user