summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2010-04-13 21:20:54 +0200
committerSegher Boessenkool <segher@kernel.crashing.org>2010-04-13 21:27:16 +0200
commit9e7e7ac909fc4abb5a1eb4ce0aa07e79373b0b11 (patch)
treed2c07fb1a7d51b05ebcdf228cba73b07fe406128
parentdf77ded66aaf43978fab8f0dbb341b710ffdb042 (diff)
GL: Add ARB_precision_hint_nicest option the the fragment shaders
This is needed for NV hardware, they default to 16-bit floating point otherwise. Bah. Doesn't negatively affect ATI hardware, it uses 24-bit always.
-rw-r--r--render-gl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/render-gl.c b/render-gl.c
index 44840d2..82ff219 100644
--- a/render-gl.c
+++ b/render-gl.c
@@ -359,17 +359,23 @@ static void init_fragment_programs(void)
{
const char tile_frag[] =
"!!ARBfp1.0\n"
+ "OPTION ARB_precision_hint_nicest; \n"
+
"TEMP r0; \n"
- "TEX r0.x, fragment.texcoord[0], texture[0], 2D; \n"
+
+ "TEX r0.x, fragment.texcoord[0], texture[0], 2D; \n" //**
"ADD r0.x, r0.x, fragment.color.r; \n"
- "TEX r0, r0, texture[1], 1D; \n"
+
+ "TEX r0, r0, texture[1], 1D; \n" //**
"MUL r0.a, r0.a, fragment.color.a; \n"
"MOV result.color, r0; \n"
+
"END";
init_fragment_program(&tile_fragment_program, tile_frag);
const char page_frag[] =
"!!ARBfp1.0\n"
+ "OPTION ARB_precision_hint_nicest; \n"
"TEMP coor, tile_coor, tile, tile_colour; \n"
"TEMP atlas_coor, palette_coor, colour, hoff; \n"