struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
+ if (num_samplers > PIPE_MAX_SAMPLERS) {
+ glhd_error("%u fragment samplers requested, "
+ "but only %u are permitted by API",
+ num_samplers, PIPE_MAX_SAMPLERS);
+ }
+
pipe->bind_fragment_sampler_states(pipe,
num_samplers,
samplers);
struct galahad_context *glhd_pipe = galahad_context(_pipe);
struct pipe_context *pipe = glhd_pipe->pipe;
+ if (num_samplers > PIPE_MAX_VERTEX_SAMPLERS) {
+ glhd_error("%u vertex samplers requested, "
+ "but only %u are permitted by API",
+ num_samplers, PIPE_MAX_VERTEX_SAMPLERS);
+ }
+
pipe->bind_vertex_sampler_states(pipe,
num_samplers,
samplers);
struct pipe_resource *unwrapped_resource;
struct pipe_resource *resource = NULL;
+ if (shader >= PIPE_SHADER_TYPES) {
+ glhd_error("Unknown shader type %u", shader);
+ }
+
/* XXX hmm? unwrap the input state */
if (_resource) {
unwrapped_resource = galahad_resource_unwrap(_resource);
struct i915_context *i915 = i915_context(pipe);
unsigned i;
- assert(num <= PIPE_MAX_SAMPLERS);
-
/* Check for no-op */
if (num == i915->num_samplers &&
!memcmp(i915->sampler, sampler, num * sizeof(void *)))
struct i915_context *i915 = i915_context(pipe);
draw_flush(i915->draw);
- assert(shader < PIPE_SHADER_TYPES);
assert(index == 0);
/* Make a copy of shader constants.