}
if(!pipe->set_stream_output_buffers)
caps.so = false;
+ if(!pipe->set_geometry_sampler_views)
+ caps.stages_with_sampling &=~ (1 << PIPE_SHADER_GEOMETRY);
+ if(!pipe->set_fragment_sampler_views)
+ caps.stages_with_sampling &=~ (1 << PIPE_SHADER_FRAGMENT);
+ if(!pipe->set_vertex_sampler_views)
+ caps.stages_with_sampling &=~ (1 << PIPE_SHADER_VERTEX);
update_flags = 0;
{
while(num_shader_resource_views[s] && !sampler_views[s][num_shader_resource_views[s] - 1]) \
--num_shader_resource_views[s];
- if(s < caps.stages)
+ if((1 << s) & caps.stages_with_sampling)
{
struct pipe_sampler_view* views_to_bind[PIPE_MAX_SAMPLERS];
unsigned num_views_to_bind = shaders[s] ? shaders[s]->slot_to_resource.size() : 0;
{
while(num_samplers[s] && !sampler_csos[s].v[num_samplers[s] - 1])
--num_samplers[s];
- if(s < caps.stages)
+ if((1 << s) & caps.stages_with_sampling)
{
void* samplers_to_bind[PIPE_MAX_SAMPLERS];
unsigned num_samplers_to_bind = shaders[s] ? shaders[s]->slot_to_sampler.size() : 0;
screen_caps.stages = i + 1;
}
+ screen_caps.stages_with_sampling = (1 << screen_caps.stages) - 1;
+ if(!screen->get_param(screen, PIPE_CAP_MAX_VERTEX_TEXTURE_UNITS))
+ screen_caps.stages_with_sampling &=~ (1 << PIPE_SHADER_VERTEX);
+
memset(format_support, 0xff, sizeof(format_support));
float default_level;