diff options
author | Michal Krol <michal@tungstengraphics.com> | 2008-08-18 22:38:48 +0200 |
---|---|---|
committer | Michal Krol <michal@tungstengraphics.com> | 2008-08-19 00:44:13 +0200 |
commit | 81dbc31f8b21aecdb91802dd4481057bd670f227 (patch) | |
tree | d3dead83e519ab81781fbdfa498b37587577a008 /src | |
parent | 2b512c0135bc8512cc80009ea7430f7cc0c869d6 (diff) |
st: Fix immediate construction.
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_mesa_to_tgsi.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_mesa_to_tgsi.c b/src/mesa/state_tracker/st_mesa_to_tgsi.c index 198d406b59..372e4672f6 100644 --- a/src/mesa/state_tracker/st_mesa_to_tgsi.c +++ b/src/mesa/state_tracker/st_mesa_to_tgsi.c @@ -1,6 +1,6 @@ /************************************************************************** * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * Copyright 2007-2008 Tungsten Graphics, Inc., Cedar Park, Texas. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -175,10 +175,11 @@ static struct tgsi_full_immediate make_immediate(const float *value, uint size) { struct tgsi_full_immediate imm; - imm.Immediate.Type = TGSI_TOKEN_TYPE_IMMEDIATE; - imm.Immediate.Size = 1 + size; /* one for the token itself */ + + imm = tgsi_default_full_immediate(); + imm.Immediate.Size += size; imm.Immediate.DataType = TGSI_IMM_FLOAT32; - imm.u.ImmediateFloat32 = (struct tgsi_immediate_float32 *) value; + imm.u.Pointer = value; return imm; } |