gallium/identity: add 'start' parameter to bind_sampler_states/views()
This commit is contained in:
@@ -161,12 +161,16 @@ identity_create_sampler_state(struct pipe_context *_pipe,
|
|||||||
static void
|
static void
|
||||||
identity_bind_sampler_states(struct pipe_context *_pipe,
|
identity_bind_sampler_states(struct pipe_context *_pipe,
|
||||||
unsigned shader,
|
unsigned shader,
|
||||||
|
unsigned start,
|
||||||
unsigned num_samplers,
|
unsigned num_samplers,
|
||||||
void **samplers)
|
void **samplers)
|
||||||
{
|
{
|
||||||
struct identity_context *id_pipe = identity_context(_pipe);
|
struct identity_context *id_pipe = identity_context(_pipe);
|
||||||
struct pipe_context *pipe = id_pipe->pipe;
|
struct pipe_context *pipe = id_pipe->pipe;
|
||||||
|
|
||||||
|
/* remove this when we have pipe->bind_sampler_states(..., start, ...) */
|
||||||
|
assert(start == 0);
|
||||||
|
|
||||||
switch (shader) {
|
switch (shader) {
|
||||||
case PIPE_SHADER_VERTEX:
|
case PIPE_SHADER_VERTEX:
|
||||||
pipe->bind_vertex_sampler_states(pipe, num_samplers, samplers);
|
pipe->bind_vertex_sampler_states(pipe, num_samplers, samplers);
|
||||||
@@ -188,7 +192,7 @@ identity_bind_fragment_sampler_states(struct pipe_context *_pipe,
|
|||||||
void **samplers)
|
void **samplers)
|
||||||
{
|
{
|
||||||
identity_bind_sampler_states(_pipe, PIPE_SHADER_FRAGMENT,
|
identity_bind_sampler_states(_pipe, PIPE_SHADER_FRAGMENT,
|
||||||
num_samplers, samplers);
|
0, num_samplers, samplers);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -197,7 +201,7 @@ identity_bind_vertex_sampler_states(struct pipe_context *_pipe,
|
|||||||
void **samplers)
|
void **samplers)
|
||||||
{
|
{
|
||||||
identity_bind_sampler_states(_pipe, PIPE_SHADER_VERTEX,
|
identity_bind_sampler_states(_pipe, PIPE_SHADER_VERTEX,
|
||||||
num_samplers, samplers);
|
0, num_samplers, samplers);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -506,6 +510,7 @@ identity_set_viewport_state(struct pipe_context *_pipe,
|
|||||||
static void
|
static void
|
||||||
identity_set_sampler_views(struct pipe_context *_pipe,
|
identity_set_sampler_views(struct pipe_context *_pipe,
|
||||||
unsigned shader,
|
unsigned shader,
|
||||||
|
unsigned start,
|
||||||
unsigned num,
|
unsigned num,
|
||||||
struct pipe_sampler_view **_views)
|
struct pipe_sampler_view **_views)
|
||||||
{
|
{
|
||||||
@@ -515,6 +520,9 @@ identity_set_sampler_views(struct pipe_context *_pipe,
|
|||||||
struct pipe_sampler_view **views = NULL;
|
struct pipe_sampler_view **views = NULL;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
|
/* remove this when we have pipe->set_sampler_views(..., start, ...) */
|
||||||
|
assert(start == 0);
|
||||||
|
|
||||||
if (_views) {
|
if (_views) {
|
||||||
for (i = 0; i < num; i++)
|
for (i = 0; i < num; i++)
|
||||||
unwrapped_views[i] = identity_sampler_view_unwrap(_views[i]);
|
unwrapped_views[i] = identity_sampler_view_unwrap(_views[i]);
|
||||||
@@ -544,7 +552,7 @@ identity_set_fragment_sampler_views(struct pipe_context *_pipe,
|
|||||||
unsigned num,
|
unsigned num,
|
||||||
struct pipe_sampler_view **_views)
|
struct pipe_sampler_view **_views)
|
||||||
{
|
{
|
||||||
identity_set_sampler_views(_pipe, PIPE_SHADER_FRAGMENT, num, _views);
|
identity_set_sampler_views(_pipe, PIPE_SHADER_FRAGMENT, 0, num, _views);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -552,7 +560,7 @@ identity_set_vertex_sampler_views(struct pipe_context *_pipe,
|
|||||||
unsigned num,
|
unsigned num,
|
||||||
struct pipe_sampler_view **_views)
|
struct pipe_sampler_view **_views)
|
||||||
{
|
{
|
||||||
identity_set_sampler_views(_pipe, PIPE_SHADER_VERTEX, num, _views);
|
identity_set_sampler_views(_pipe, PIPE_SHADER_VERTEX, 0, num, _views);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user