summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_surface.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-07-31 23:32:14 +0200
committerChristoph Bumiller <[email protected]>2012-08-01 15:39:46 +0200
commit8592933de82f7742f411cb2f2c339ff7d42266da (patch)
tree1d745c06fc8601af93638d696dd5f27a7de73e59 /src/gallium/drivers/nvc0/nvc0_surface.c
parent6286d9810b7ebae588060370cd7a63c327478a2f (diff)
nv50,nvc0: make resolve sampler objects allow sRGB conversion
Just figured out what that bit does. Note: It's converted back to sRGB on write, so no effective conversion occurs.
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_surface.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_surface.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_surface.c b/src/gallium/drivers/nvc0/nvc0_surface.c
index 607b02e0277..d52de0b6186 100644
--- a/src/gallium/drivers/nvc0/nvc0_surface.c
+++ b/src/gallium/drivers/nvc0/nvc0_surface.c
@@ -33,6 +33,7 @@
#include "nvc0_resource.h"
#include "nv50/nv50_defs.xml.h"
+#include "nv50/nv50_texture.xml.h"
#define NVC0_ENG2D_SUPPORTED_FORMATS 0xff9ccfe1cce3ccc9ULL
@@ -664,15 +665,20 @@ nvc0_blitctx_make_sampler(struct nvc0_blitctx *blit)
blit->sampler[0].id = -1;
- blit->sampler[0].tsc[0] = 0x00000092;
- blit->sampler[0].tsc[1] = 0x00000051;
+ blit->sampler[0].tsc[0] = NV50_TSC_0_SRGB_CONVERSION_ALLOWED |
+ (NV50_TSC_WRAP_CLAMP_TO_EDGE << NV50_TSC_0_WRAPS__SHIFT) |
+ (NV50_TSC_WRAP_CLAMP_TO_EDGE << NV50_TSC_0_WRAPT__SHIFT) |
+ (NV50_TSC_WRAP_CLAMP_TO_EDGE << NV50_TSC_0_WRAPR__SHIFT);
+ blit->sampler[0].tsc[1] =
+ NV50_TSC_1_MAGF_NEAREST | NV50_TSC_1_MINF_NEAREST | NV50_TSC_1_MIPF_NONE;
/* clamp to edge, min/max lod = 0, bilinear filtering */
blit->sampler[1].id = -1;
- blit->sampler[1].tsc[0] = 0x00000092;
- blit->sampler[1].tsc[1] = 0x00000062;
+ blit->sampler[1].tsc[0] = blit->sampler[0].tsc[0];
+ blit->sampler[1].tsc[1] =
+ NV50_TSC_1_MAGF_LINEAR | NV50_TSC_1_MINF_LINEAR | NV50_TSC_1_MIPF_NONE;
}
/* Since shaders cannot export stencil, we cannot copy stencil values when