projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cd70b6b
)
llvmpipe: Respect pipe_sampler_view::format.
author
José Fonseca
<jfonseca@vmware.com>
Mon, 12 Apr 2010 06:16:01 +0000
(15:16 +0900)
committer
José Fonseca
<jfonseca@vmware.com>
Mon, 12 Apr 2010 06:32:23 +0000
(15:32 +0900)
src/gallium/auxiliary/gallivm/lp_bld_sample.c
patch
|
blob
|
history
src/gallium/auxiliary/gallivm/lp_bld_sample.h
patch
|
blob
|
history
src/gallium/drivers/llvmpipe/lp_state_fs.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/gallivm/lp_bld_sample.c
b/src/gallium/auxiliary/gallivm/lp_bld_sample.c
index 4004741c19f105cf3137123464ec1e9f9ace3ab8..eb75b9b393dbcc76436925df6c6bcd3cd1c2b421 100644
(file)
--- a/
src/gallium/auxiliary/gallivm/lp_bld_sample.c
+++ b/
src/gallium/auxiliary/gallivm/lp_bld_sample.c
@@
-51,9
+51,11
@@
*/
void
lp_sampler_static_state(struct lp_sampler_static_state *state,
*/
void
lp_sampler_static_state(struct lp_sampler_static_state *state,
- const struct pipe_
resource *texture
,
+ const struct pipe_
sampler_view *view
,
const struct pipe_sampler_state *sampler)
{
const struct pipe_sampler_state *sampler)
{
+ const struct pipe_resource *texture = view->texture;
+
memset(state, 0, sizeof *state);
if(!texture)
memset(state, 0, sizeof *state);
if(!texture)
@@
-74,7
+76,7
@@
lp_sampler_static_state(struct lp_sampler_static_state *state,
* regarding 1D/2D/3D/CUBE textures, wrap modes, etc.
*/
* regarding 1D/2D/3D/CUBE textures, wrap modes, etc.
*/
- state->format =
texture
->format;
+ state->format =
view
->format;
state->target = texture->target;
state->pot_width = util_is_pot(texture->width0);
state->pot_height = util_is_pot(texture->height0);
state->target = texture->target;
state->pot_width = util_is_pot(texture->width0);
state->pot_height = util_is_pot(texture->height0);
@@
-104,6
+106,10
@@
lp_sampler_static_state(struct lp_sampler_static_state *state,
state->border_color[1] = sampler->border_color[1];
state->border_color[2] = sampler->border_color[2];
state->border_color[3] = sampler->border_color[3];
state->border_color[1] = sampler->border_color[1];
state->border_color[2] = sampler->border_color[2];
state->border_color[3] = sampler->border_color[3];
+
+ /*
+ * FIXME: Handle the remainder of pipe_sampler_view.
+ */
}
}
diff --git
a/src/gallium/auxiliary/gallivm/lp_bld_sample.h
b/src/gallium/auxiliary/gallivm/lp_bld_sample.h
index 94ebe0818aef37dc578d91e4310af39733237283..8c1af95c506bfa879c074145d6705230b981431c 100644
(file)
--- a/
src/gallium/auxiliary/gallivm/lp_bld_sample.h
+++ b/
src/gallium/auxiliary/gallivm/lp_bld_sample.h
@@
-39,6
+39,7
@@
#include "gallivm/lp_bld.h"
struct pipe_resource;
#include "gallivm/lp_bld.h"
struct pipe_resource;
+struct pipe_sampler_view;
struct pipe_sampler_state;
struct util_format_description;
struct lp_type;
struct pipe_sampler_state;
struct util_format_description;
struct lp_type;
@@
-130,7
+131,7
@@
struct lp_sampler_dynamic_state
*/
void
lp_sampler_static_state(struct lp_sampler_static_state *state,
*/
void
lp_sampler_static_state(struct lp_sampler_static_state *state,
- const struct pipe_
resource *texture
,
+ const struct pipe_
sampler_view *view
,
const struct pipe_sampler_state *sampler);
const struct pipe_sampler_state *sampler);
diff --git
a/src/gallium/drivers/llvmpipe/lp_state_fs.c
b/src/gallium/drivers/llvmpipe/lp_state_fs.c
index c57b4a4258e595533ff5423d6d78beb0cc1c865d..e82364d4b6dfe67c15d50bc97465d0ab49876458 100644
(file)
--- a/
src/gallium/drivers/llvmpipe/lp_state_fs.c
+++ b/
src/gallium/drivers/llvmpipe/lp_state_fs.c
@@
-1130,7
+1130,7
@@
make_variant_key(struct llvmpipe_context *lp,
for(i = 0; i < PIPE_MAX_SAMPLERS; ++i)
if(shader->info.file_mask[TGSI_FILE_SAMPLER] & (1 << i))
for(i = 0; i < PIPE_MAX_SAMPLERS; ++i)
if(shader->info.file_mask[TGSI_FILE_SAMPLER] & (1 << i))
- lp_sampler_static_state(&key->sampler[i], lp->fragment_sampler_views[i]
->texture
, lp->sampler[i]);
+ lp_sampler_static_state(&key->sampler[i], lp->fragment_sampler_views[i], lp->sampler[i]);
}
}