diff options
author | Ben Skeggs <[email protected]> | 2009-06-06 10:57:19 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2009-06-06 16:24:08 +1000 |
commit | 6c1627a51c237428a79613fcda1412c4660780de (patch) | |
tree | 7e74d2b09d5f1943930129985c8998c535fe2f15 /src/gallium/drivers/nv50/nv50_state.c | |
parent | b7aa5b1d10cbe2fd0b796538426f1f2910a4832c (diff) |
nv50: support non-normalized texture coords
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_state.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_state.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c index 9d41ef55b0f..116866a8e78 100644 --- a/src/gallium/drivers/nv50/nv50_state.c +++ b/src/gallium/drivers/nv50/nv50_state.c @@ -136,7 +136,8 @@ static void * nv50_sampler_state_create(struct pipe_context *pipe, const struct pipe_sampler_state *cso) { - unsigned *tsc = CALLOC(8, sizeof(unsigned)); + struct nv50_sampler_stateobj *sso = CALLOC(1, sizeof(*sso)); + unsigned *tsc = sso->tsc; float limit; tsc[0] = (0x00026000 | @@ -209,7 +210,8 @@ nv50_sampler_state_create(struct pipe_context *pipe, tsc[2] |= ((int)CLAMP(cso->max_lod, 0.0, 15.0) << 20) | ((int)CLAMP(cso->min_lod, 0.0, 15.0) << 8); - return (void *)tsc; + sso->normalized = cso->normalized_coords; + return (void *)sso; } static void |