[Mesa-dev] [PATCH 1/2] gallium: remove PIPE_CAP_MAX_COMBINED_SAMPLERS

Ben Skeggs skeggsb at gmail.com
Tue Feb 4 04:24:50 CET 2014


On Tue, Feb 4, 2014 at 1:22 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> OK, so from the _looks_ of it, vertex and fragment texture/sampler
> bindings are totally separate. Based on what I'm seeing, there are 16
> slots for fragment shaders, and 4 for vertex shaders.
>From what I understand, they're completely separate and the use of one
imposes no limitations on the other.

>
> On Mon, Feb 3, 2014 at 8:51 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>> Hmmm... unclear from a quick read of the code. nv40_verttex.c looks at
>> nv30->fragprog.textures/samplers (instead of nv30->vertprog) to
>> disable VTXTEX_ENABLE, but doesn't do anything with them if they're
>> set. Could just be a copy-pasta situation, or could be that TEX_ENABLE
>> and VTXTEX_ENABLE can't be set for the same index... The
>> enables/formats/etc are all in separate registers, but there's nothing
>> saying that you can use both at the same time. I'll see if there's any
>> docs on it when I get home.
>>
>> Separately, the chances of major new features being implemented in
>> nv30 at this point are relatively low. I'm probably the only person
>> looking at it, and I'm just trying to make the current functionality
>> work (or at least be not as wrong). There's sitll quite some work
>> ahead in that regard --
>> http://people.freedesktop.org/~imirkin/nv40-comparison/problems.html
>>
>> On Mon, Feb 3, 2014 at 7:58 PM, Marek Olšák <maraeo at gmail.com> wrote:
>>> nv40 supports texturing in the vertex shader, but I don't know if the
>>> number of textures used by the vertex shader doesn't limit the maximum
>>> number of textures which can be used by the fragment shader. For
>>> example, if the vertex shaders uses 4 textures, the fragment shader
>>> can only use 12 instead of 16. I'm asking if nv40 has such a
>>> limitation.
>>>
>>> Thank you.
>>>
>>> Marek
>>>
>>> On Tue, Feb 4, 2014 at 1:37 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>>> [+ben, nv30 driver author]
>>>>
>>>> On Mon, Feb 3, 2014 at 7:18 PM, Marek Olšák <maraeo at gmail.com> wrote:
>>>>> Ilia,
>>>>>
>>>>> I see you worked on nv30. Are vertex shader texture slots shared with
>>>>> fragment shader texture slots on nv40? If yes, does the nouveau team
>>>>> plan to implement vertex shader textures for nv40?
>>>>
>>>> Unfortunately my knowledge of these things is... limited. I haven't
>>>> really touched the nv30 shader stuff much, esp not relating to
>>>> textures. Ben, do you know what Marek is talking about? If not, I'll
>>>> try to investigate.
>>>>
>>>> Marek -- perhaps you can give me an example of what you mean? Are you
>>>> talking about, e.g. texture(sampler2D, ...), and whether one can do
>>>> that from within the vertex shader and whether one can attach those
>>>> samplers/textures to vs/fs independently or not? (Sorry, my knowledge
>>>> of opengl and 3d hardware and esp terminology is still very poor. But
>>>> I'm learning...)
>>>>
>>>>>
>>>>> Marek
>>>>>
>>>>> On Wed, Jan 22, 2014 at 9:36 PM, Marek Olšák <maraeo at gmail.com> wrote:
>>>>>> On Mon, Jan 20, 2014 at 3:35 PM, Brian Paul <brianp at vmware.com> wrote:
>>>>>>> I'm not sure about this.  The concept of MAX_COMBINED_TEXTURE_IMAGE_UNITS
>>>>>>> goes back to the first shader hardware where texture image units might be
>>>>>>> shared between the VS and FS.
>>>>>>>
>>>>>>> The question is whether any of the hardware we care about has that
>>>>>>> restriction.
>>>>>>
>>>>>> I'm not aware of any hardware which has the restriction. I think
>>>>>> the reason MAX_COMBINED_TEXTURE_IMAGE_UNITS exists is that the OpenGL
>>>>>> texture units are shared by all shader stages.
>>>>>>
>>>>>> Marek
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list